View Source ActivityPubWeb.Publisher (bonfire v0.3.0-classic-beta.4)

Link to this section Summary

Functions

Determine a user inbox to use based on heuristics. These heuristics are based on an approximation of the sharedInbox rules in the ActivityPub specification.

If you put the URL of the shared inbox of an ActivityPub instance in the following env variable, all public content will be pushed there via AP federation for search indexing purposes: PUSH_ALL_PUBLIC_CONTENT_TO_INSTANCE #TODO: move to adapter

Publish a single message to a peer. Takes a struct with the following parameters set

Link to this section Functions

Link to this function

determine_inbox(map, user)

View Source

Determine a user inbox to use based on heuristics. These heuristics are based on an approximation of the sharedInbox rules in the ActivityPub specification.

Please do not edit this function (or its children) without reading the spec, as editing the code is likely to introduce some breakage without some familiarity.

Link to this function

gather_webfinger_links(actor)

View Source

Callback implementation for ActivityPubWeb.Federator.Publisher.gather_webfinger_links/1.

Link to this function

is_representable?(activity)

View Source

Callback implementation for ActivityPubWeb.Federator.Publisher.is_representable?/1.

Link to this function

maybe_federate_to_search_index(recipients, activity)

View Source

If you put the URL of the shared inbox of an ActivityPub instance in the following env variable, all public content will be pushed there via AP federation for search indexing purposes: PUSH_ALL_PUBLIC_CONTENT_TO_INSTANCE #TODO: move to adapter

Link to this function

publish(actor, activity)

View Source

Callback implementation for ActivityPubWeb.Federator.Publisher.publish/2.

Publish a single message to a peer. Takes a struct with the following parameters set:

  • inbox: the inbox to publish to
  • json: the JSON message body representing the ActivityPub message
  • actor: the actor which is signing the message
  • id: the ActivityStreams URI of the message