class

ActivityPub::Actor

Inherits ActivityPub < Ktistec::KeyPair < Ktistec::Model::Blockable < Ktistec::Model::Deletable < Ktistec::Model::Polymorphic < Ktistec::Model::Linked < Ktistec::Model::Common < Ktistec::Model < Reference < Object

Constants

ALIASES = ["ActivityPub::Actor::Application", "ActivityPub::Actor::Group", "ActivityPub::Actor::Organization", "ActivityPub::Actor::Service"]
ATTACHMENT_LIMIT = 6
Log = ::Log.for(self)
VALID_HANDLE = /\A[a-zA-Z0-9_.~-]+@[a-zA-Z0-9.-]+\z/

Constructors

dereference(key_pair, iri, *, ignore_cached = false, include_deleted = false, deadline : Time::Instant | Nil, **options) : self
Source

Class methods

all_subtypes

Returns type and all concrete (non-abstract) subtypes, including any aliases defined on the type.

Source
dereference?(key_pair, iri, *, ignore_cached = false, include_deleted = false, deadline : Time::Instant | Nil = nil, **options) : self | Nil
Source
find(_iri iri : String | Nil, include_deleted : Bool = false, include_undone : Bool = false)
Source
find?(_iri iri : String | Nil, include_deleted : Bool = false, include_undone : Bool = false)
Source
from_json_ld(json, **options)
Source
from_json_ld?(json, **options)
Source
map(json, *, include_key = false, **options)
Source
match?(account)
Source
search_by_username(prefix, limit = 10)

Searches for actors whose username starts with the given prefix.

Returns actors in alphabetical order by username. Filters out deleted and blocked actors. Treats SQL LIKE wildcards (% and _) as literal characters.

Source

Instance methods

_append_to_emojis(model_ : Tag::Emoji) : Nil
Source
_append_to_filter_terms(model_ : FilterTerm) : Nil
Source
_append_to_objects(model_ : ActivityPub::Object) : Nil
Source
_association_emojis
Source
_association_filter_terms
Source
_association_objects
Source
_has_many_setter_for_emojis(emojis_ : Enumerable(Tag::Emoji), update_associations = true) : Enumerable(Tag::Emoji)
Source
_has_many_setter_for_filter_terms(filter_terms_ : Enumerable(FilterTerm), update_associations = true) : Enumerable(FilterTerm)
Source
_has_many_setter_for_objects(objects_ : Enumerable(ActivityPub::Object), update_associations = true) : Enumerable(ActivityPub::Object)
Source
after_block
Source
after_unblock
Source
all_follow_requests(*, max_id = nil, min_id = nil, limit = 10)
Source
all_followers(*, max_id = nil, min_id = nil, limit = 10, public = false)
Source
all_following(*, max_id = nil, min_id = nil, limit = 10, public = true)
Source
all_posts(since : Time)

Returns the count of the actor's posts since the given date.

See #all_posts(max_id, min_id, limit) for further details.

Source
all_posts(*, max_id = nil, min_id = nil, limit = 10)

Returns the actor's posts and shares.

Meant to be called on local (not cached) actors.

Includes private posts and replies!

Source
announces(since : Time)

Returns the count of objects that this actor has announced (boosted) since the given date.

See #announces(max_id, min_id, limit) for further details.

Source
announces(*, max_id = nil, min_id = nil, limit = 10)

Returns the objects that this actor has announced (boosted).

Returns the objects that this actor has announced.

Returns objects in reverse chronological order (by when announced, most recent first). Filters out deleted/blocked objects, and objects by deleted/blocked actors. Also filters out announces that have been undone.

Source
approve(object)
Source
attachments
Source
attachments=(attachments : Array(Attachment) | Nil)
Source
before_save
Source
before_validate
Source
bookmarks(since : Time)

Returns the count of objects that this actor has bookmarked since the given date.

See #bookmarks(max_id, min_id, limit) for further details.

Source
bookmarks(*, max_id = nil, min_id = nil, limit = 10)

Returns the objects that this actor has bookmarked.

Returns objects in reverse chronological order (most recent first). Filters out deleted/blocked objects, and objects by deleted/blocked actors.

Source
dislikes(since : Time)

Returns the count of objects that this actor has disliked since the given date.

See #dislikes(max_id, min_id, limit) for further details.

Source
dislikes(*, max_id = nil, min_id = nil, limit = 10)

Returns the objects that this actor has disliked.

Returns the objects that this actor has disliked.

Returns objects in reverse chronological order (by when disliked, most recent first). Filters out deleted/blocked objects, and objects by deleted/blocked actors. Also filters out dislikes that have been undone.

Source
display_name
Source
down!
Source
down?
Source
down_at
Source
down_at=(down_at : Time | Nil)
Source
drafts(since : Time)

Returns the count of the actor's drafts since the given date.

See #drafts(max_id, min_id, limit) for further details.

Source
drafts(*, max_id = nil, min_id = nil, limit = 10)

Returns the actor's draft posts.

Meant to be called on local (not cached) actors.

Includes only unpublished posts attributed to this actor.

Source
emojis(include_deleted : Bool = false, include_undone : Bool = false) : Enumerable(Tag::Emoji)
Source
emojis=(emojis_ : Enumerable(Tag::Emoji)) : Enumerable(Tag::Emoji)
Source
filter_terms(include_deleted : Bool = false, include_undone : Bool = false) : Enumerable(FilterTerm)
Source
filter_terms=(filter_terms_ : Enumerable(FilterTerm)) : Enumerable(FilterTerm)
Source
find_activity_for(object, inclusion = nil, exclusion = nil)
Source
find_announce_for(object : Object)
Source
find_like_for(object : Object)
Source
follow(other : Actor, **options)
Source
followed_actors
Source
followed_hashtags
Source
followed_mentions
Source
followers
Source
followers=(followers : String | Nil)
Source
following
Source
following=(following : String | Nil)
Source
follows?(other : Actor, **options)
Source
from_json_ld(json, *, include_key = false)
Source
handle
Source
icon
Source
icon=(icon : String | Nil)
Source
icon_safe
Source
image
Source
image=(image : String | Nil)
Source
image_safe
Source
in_inbox(*, max_id = nil, min_id = nil, limit = 10, public = true)
Source
in_inbox?(object : Object, inclusion = nil, exclusion = nil)
Source
in_outbox(*, max_id = nil, min_id = nil, limit = 10, public = true)
Source
in_outbox?(object : Object, inclusion = nil, exclusion = nil)
Source
inbox
Source
inbox=(inbox : String | Nil)
Source
iri
iri=(iri : String)
known_posts(*, max_id = nil, min_id = nil, limit = 10, exclude_pinned = false)

Returns the actor's known posts.

Meant to be called on both local and cached actors.

Orders by publication time (most recent first).

Does not include private (not visible) posts.

Includes pinned posts, by default.

Source
last_activity_from(other : ActivityPub::Actor) : Time | Nil

Returns the arrival time of the most recent activity from another actor in this actor's inbox.

Returns nil if no activity has arrived.

Source
likes(since : Time)

Returns the count of objects that this actor has liked since the given date.

See #likes(max_id, min_id, limit) for further details.

Source
likes(*, max_id = nil, min_id = nil, limit = 10)

Returns the objects that this actor has liked.

Returns the objects that this actor has liked.

Returns objects in reverse chronological order (by when liked, most recent first). Filters out deleted/blocked objects, and objects by deleted/blocked actors. Also filters out likes that have been undone.

Source
make_delete_activity
Source
name
Source
name=(name : String | Nil)
Source
notifications(since : Time)

Returns the count of notifications for the actor since the given date.

See #notifications(max_id, min_id, limit) for further details.

Source
notifications(*, max_id = nil, min_id = nil, limit = 10)

Returns notifications for the actor.

Meant to be called on local (not cached) actors.

Source
objects(include_deleted : Bool = false, include_undone : Bool = false) : Enumerable(ActivityPub::Object)
Source
objects=(objects_ : Enumerable(ActivityPub::Object)) : Enumerable(ActivityPub::Object)
Source
outbox
Source
outbox=(outbox : String | Nil)
Source
pem_private_key
Source
pem_private_key=(pem_private_key : String | Nil)
Source
pem_public_key
Source
pem_public_key=(pem_public_key : String | Nil)
Source
pinned_posts

Returns the actor's pinned posts.

Meant to be called on both local and cached actors.

Source
pins(since : Time)

Returns the count of objects that this actor has pinned since the given date.

See #pins(max_id, min_id, limit) for further details.

Source
pins(*, max_id = nil, min_id = nil, limit = 10)

Returns the objects that this actor has pinned.

Returns objects in reverse chronological order (most recent first). Filters out deleted/blocked objects, and objects by deleted/blocked actors. Does not include private (not visible) posts.

Source
private_key
Source
public_key
Source
public_posts(*, max_id = nil, min_id = nil, limit = 10, exclude_pinned = false)

Returns the actor's public posts and shares.

Meant to be called on local (not cached) actors.

Does not include private (not visible) posts and replies.

Source
shared_inbox
Source
shared_inbox=(shared_inbox : String | Nil)
Source
summary
Source
summary=(summary : String | Nil)
Source
terms(*, max_id = nil, min_id = nil, limit = 10)

Returns the content filter terms for the actor.

Source
timeline(since : Time, exclude_replies = false, inclusion = nil)

Returns the count of entries in the actor's timeline since the given date.

See #timeline(exclude_replies, inclusion, max_id, min_id, limit) for further details.

Source
timeline(*, exclude_replies = false, inclusion = nil, max_id = nil, min_id = nil, limit = 10)

Returns entries in the actor's timeline.

Meant to be called on local (not cached) actors.

Includes private (not visible) posts and replies.

May be filtered to exclude replies (via exclude_replies).

May be filtered to include only objects with associated relationships of the specified type (via inclusion).

Source
to_json_ld(recursive = true)
Source
unapprove(object)
Source
urls
Source
urls=(urls : Array(String) | Nil)
Source
username
Source
username=(username : String | Nil)
Source
verified_handle

the verified, persisted webfinger address

Source
verified_handle=(verified_handle : String | Nil)

the verified, persisted webfinger address

Source
verify_handle!(deadline : Time::Instant | Nil = nil)
Source
webfinger

the webfinger address an actor claims, parsed but never persisted -- it is untrusted until WebFinger confirms it

Source
webfinger=(webfinger : String | Nil)

the webfinger address an actor claims, parsed but never persisted -- it is untrusted until WebFinger confirms it

Source

Nested types