View Source Mobilizon.Federation.ActivityPub.Actor (Mobilizon v5.0.0-beta.1)
Module to handle ActivityPub Actor interactions
Summary
Functions
Find an actor in our local database or call WebFinger to find what's its AP ID is and then fetch it
Getting an actor from url, eventually creating it if we don't have it locally or if it needs an update
Create an actor inside our database from username, using WebFinger to find out its AP ID and then fetch it
Create an actor locally by its URL (AP ID)
Types
@type make_actor_errors() :: Mobilizon.Federation.ActivityPub.Fetcher.fetch_actor_errors() | :actor_is_local
Functions
@spec find_or_make_actor_from_nickname(nickname :: String.t(), type :: atom() | nil) :: {:ok, Mobilizon.Actors.Actor.t()} | {:error, make_actor_errors() | Mobilizon.Federation.WebFinger.finger_errors()}
Find an actor in our local database or call WebFinger to find what's its AP ID is and then fetch it
@spec find_or_make_group_from_nickname(nick :: String.t()) :: {:ok, Mobilizon.Actors.Actor.t()} | {:error, make_actor_errors() | Mobilizon.Federation.WebFinger.finger_errors()}
@spec get_or_fetch_actor_by_url(url :: String.t(), options :: Keyword.t()) :: {:ok, Mobilizon.Actors.Actor.t()} | {:error, make_actor_errors()} | {:error, :no_internal_relay_actor} | {:error, :url_nil}
Getting an actor from url, eventually creating it if we don't have it locally or if it needs an update
@spec make_actor_from_nickname(nickname :: String.t(), options :: Keyword.t()) :: {:ok, Mobilizon.Actors.Actor.t()} | {:error, make_actor_errors() | Mobilizon.Federation.WebFinger.finger_errors()}
Create an actor inside our database from username, using WebFinger to find out its AP ID and then fetch it
@spec make_actor_from_url(url :: String.t(), options :: Keyword.t()) :: {:ok, Mobilizon.Actors.Actor.t()} | {:error, make_actor_errors() | Ecto.Changeset.t()}
Create an actor locally by its URL (AP ID)