Function activitypub_federation::activity_queue::queue_activity
source · pub async fn queue_activity<Activity, Datatype, ActorType>(
activity: &Activity,
actor: &ActorType,
inboxes: Vec<Url>,
data: &Data<Datatype>
) -> Result<(), Error>
Expand description
Send a new activity to the given inboxes with automatic retry on failure. Alternatively you can implement your own queue and then send activities using [crate::activity_sending::SendActivityTask].
activity
: The activity to be sent, gets converted to jsonprivate_key
: Private key belonging to the actor who sends the activity, for signing HTTP signature. Generated with crate::http_signatures::generate_actor_keypair.inboxes
: List of remote actor inboxes that should receive the activity. Ignores local actor inboxes. Should be built by calling crate::traits::Actor::shared_inbox_or_inbox for each target actor.