View Source Mobilizon.Federation.ActivityPub.Audience (Mobilizon v5.0.0-beta.1)

Tools for calculating content audience

Summary

Functions

Get audience for an entity

Determines the full audience based on mentions for an audience

Types

@type audience() :: %{required(String.t()) => [String.t()]}

Functions

Get audience for an entity

Link to this function

get_to_and_cc(actor, mentions, arg3)

View Source
@spec get_to_and_cc(
  Mobilizon.Actors.Actor.t(),
  list(),
  :direct | :private | :public | :unlisted | {:list, any()}
) :: {list(), list()}

Determines the full audience based on mentions for an audience

For a public audience:

  • to : the mentioned actors, the eventual actor we're replying to and the public
  • cc : the actor's followers

For an unlisted audience:

  • to : the mentioned actors, actor's followers and the eventual actor we're replying to
  • cc : public

For a private audience:

  • to : the mentioned actors, actor's followers and the eventual actor we're replying to
  • cc : none

For a direct audience:

  • to : the mentioned actors and the eventual actor we're replying to
  • cc : none