View Source Mobilizon.Actors.Member (Mobilizon v5.0.0-beta.1)

Represents the membership of an actor to a group.

Summary

Functions

Checks whether the member is an administrator (admin or creator) of the group.

Checks whether the actor can be joined to the group.

Gets the default member role depending on the actor openness.

Types

@type t() :: %Mobilizon.Actors.Member{
  __meta__: term(),
  actor: Mobilizon.Actors.Actor.t(),
  actor_id: term(),
  id: String.t(),
  inserted_at: term(),
  invited_by: term(),
  invited_by_id: term(),
  member_since: term(),
  metadata: Mobilizon.Actors.Member.Metadata.t(),
  parent: Mobilizon.Actors.Actor.t(),
  parent_id: term(),
  role: atom(),
  updated_at: term(),
  url: String.t()
}

Functions

@spec administrator?(t()) :: boolean()

Checks whether the member is an administrator (admin or creator) of the group.

Checks whether the actor can be joined to the group.

Link to this function

get_default_member_role(actor)

View Source
@spec get_default_member_role(Mobilizon.Actors.Actor.t()) :: atom()

Gets the default member role depending on the actor openness.