View Source Mobilizon.Actors.Actor (Mobilizon v5.0.0-beta.1)
Represents an actor (local and remote).
Summary
Functions
Builds an AP URL for an actor.
Returns the display name if available, or the preferred username (with the eventual @domain suffix if it's a distant actor).
Returns display name and username.
Changeset for group creation
Returns the preferred username with the eventual @domain suffix if it's a distant actor.
Checks whether actor visibility is public.
Changeset for person registration.
Changeset for remote actor creation.
Types
@type t() :: %Mobilizon.Actors.Actor{ __meta__: term(), avatar: Mobilizon.Medias.File.t() | nil, banner: Mobilizon.Medias.File.t() | nil, comments: [Mobilizon.Discussions.Comment.t()], conversations: term(), created_reports: [Mobilizon.Reports.Report.t()], discussions_url: term(), domain: String.t() | nil, events_url: String.t(), feed_tokens: [Mobilizon.Events.FeedToken.t()], followers: [Mobilizon.Actors.Follower.t()], followers_url: String.t(), following_url: String.t(), followings: [Mobilizon.Actors.Follower.t()], id: integer(), inbox_url: String.t(), inserted_at: term(), keys: String.t(), last_refreshed_at: DateTime.t(), manually_approves_followers: boolean(), members_url: term(), memberships: [t()], mentions: [Mobilizon.Mention.t()], name: String.t() | nil, openness: atom(), organized_events: [Mobilizon.Events.Event.t()], outbox_url: String.t(), owner_shares: [Mobilizon.Share.t()], participations: [Mobilizon.Events.Participant.t()], physical_address: Mobilizon.Addresses.Address.t(), physical_address_id: term(), posts_url: String.t(), preferred_username: String.t(), report_notes: [Mobilizon.Reports.Note.t()], resources_url: String.t(), shared_inbox_url: String.t(), shares: [Mobilizon.Share.t()], subject_reports: [Mobilizon.Reports.Report.t()], summary: String.t(), suspended: boolean(), todos_url: term(), type: atom(), updated_at: term(), url: String.t(), user: Mobilizon.Users.User.t() | nil, user_id: term(), visibility: atom() }
Functions
@spec build_anonymous_actor_creation_attrs() :: Ecto.Changeset.t()
@spec build_relay_creation_attrs() :: Ecto.Changeset.t()
Builds an AP URL for an actor.
Returns the display name if available, or the preferred username (with the eventual @domain suffix if it's a distant actor).
Returns display name and username.
@spec group_creation_changeset(t() | Ecto.Schema.t(), map()) :: Ecto.Changeset.t()
Changeset for group creation
Returns the preferred username with the eventual @domain suffix if it's a distant actor.
Checks whether actor visibility is public.
@spec registration_changeset(t() | Ecto.Schema.t(), map()) :: Ecto.Changeset.t()
Changeset for person registration.
@spec remote_actor_creation_changeset(map()) :: Ecto.Changeset.t()
Changeset for remote actor creation.