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

Defines the contract used by federation implementations to publish messages to their peers.

Link to this section Summary

Callbacks

Gathers nodeinfo protocol names supported by the federation module.

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

Determine whether an activity can be relayed using the federation module.

Relays an activity to all specified peers.

Relays an activity to a specified peer, determined by the parameters. The parameters used are controlled by the federation module.

Link to this section Functions

Link to this function

enqueue_one(module, params)

View Source
enqueue_one(module(), Map.t()) :: :ok

Enqueue publishing a single activity.

Link to this function

gather_nodeinfo_protocol_names()

View Source
gather_nodeinfo_protocol_names() :: list()
Link to this function

gather_webfinger_links(user)

View Source
gather_webfinger_links(Pleroma.User.t()) :: list()
Link to this function

perform(type, module, params)

View Source
perform(atom(), module(), any()) :: {:ok, any()} | {:error, any()}
Link to this function

publish(user, activity)

View Source
publish(Pleroma.User.t(), Pleroma.Activity.t()) :: :ok

Link to this section Callbacks

Link to this callback

gather_nodeinfo_protocol_names()

View Source
gather_nodeinfo_protocol_names() :: list()

Gathers nodeinfo protocol names supported by the federation module.

Link to this callback

gather_webfinger_links(arg1)

View Source
gather_webfinger_links(Pleroma.User.t()) :: list()

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

Link to this callback

is_representable?(arg1)

View Source
is_representable?(Pleroma.Activity.t()) :: boolean()

Determine whether an activity can be relayed using the federation module.

Link to this callback

publish(arg1, arg2)

View Source
publish(Pleroma.User.t(), Pleroma.Activity.t()) :: :ok | {:error, any()}

Relays an activity to all specified peers.

Link to this callback

publish_one(arg1)

View Source
publish_one(Map.t()) :: {:ok, Map.t()} | {:error, any()}

Relays an activity to a specified peer, determined by the parameters. The parameters used are controlled by the federation module.