Pleroma v1.1.9-10-g42f76306+dev Pleroma.Web.ActivityPub.Publisher View Source

ActivityPub outgoing federation module.

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.

Gathers nodeinfo protocol names supported by the federation module.

Gathers links used by an outgoing federation module for WebFinger output.

Determine if an activity can be represented by running it through Transmogrifier.

Publishes an activity to all relevant peers.

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(activity, 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_nodeinfo_protocol_names()

View Source

Gathers nodeinfo protocol names supported by the federation module.

Callback implementation for Pleroma.Web.Federator.Publisher.gather_nodeinfo_protocol_names/0.

Link to this function

gather_webfinger_links(user)

View Source

Gathers links used by an outgoing federation module for WebFinger output.

Callback implementation for Pleroma.Web.Federator.Publisher.gather_webfinger_links/1.

Link to this function

is_representable?(activity)

View Source

Determine if an activity can be represented by running it through Transmogrifier.

Link to this function

publish(actor, activity)

View Source

Publishes an activity to all relevant peers.

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