class

InboxActivityProcessor

Inherits Reference < Object

Constants

Log = ::Log.for(self)

Class methods

deliver(account : Account, activity : ActivityPub::Activity, deliver_to : Array(String) | Nil = nil, handle_follow_request_task_class : Task::HandleFollowRequest.class = Task::HandleFollowRequest, deliver_task_class : Task::Deliver.class = Task::Deliver, deadline : Time::Instant | Nil = nil)

Produces the delivery artifacts for a local account and the side effects that belong to the account the activity implicates.

Source
maintain(activity : ActivityPub::Activity)

Corrects the local cache to match the state of the fediverse, and re-evaluates the materialized views.

Source
process(account : Account | Nil, activity : ActivityPub::Activity, deliver_to : Array(String) | Nil = nil, recipients : Array(Account) | Nil = nil, handle_follow_request_task_class : Task::HandleFollowRequest.class = Task::HandleFollowRequest, receive_task_class : Task::Receive.class = Task::Receive, deliver_task_class : Task::Deliver.class = Task::Deliver, deadline : Time::Instant | Nil = nil)

Processes an inbound activity that has already been received, validated, and saved.

Decides whether the activity is accepted into the recipient's inbox, handles activity-specific side-effects, re-evaluates the materialized views, and schedules receive task.

Preconditions:

  • activity must be saved
  • activity must be from a remote actor
  • account.actor must be the recipient when recipients is not supplied -- when it is, account is unused and may be nil
Source
process_locally(actors_accounts : Array(Tuple(ActivityPub::Actor, Account)), activity : ActivityPub::Activity)

Processes local recipients in-process.

Source