Amarula.Content.GroupInvite (amarula v0.3.0)

View Source

A received group-invite card (content of a %Amarula.Msg{type: :group_invite}) — a tap-to-join invite for a group.

  • :group — the invited group as an %Amarula.Address{}.
  • :code — the invite code (the value Amarula.Group.accept_invite/2 takes).
  • :group_name — the group's name as shown on the card.
  • :caption — accompanying text.
  • :expiration — invite expiry as a unix-ms timestamp (nil if none).

Summary

Functions

Normalize a %Proto.Message.GroupInviteMessage{} into a %Amarula.Content.GroupInvite{}.

Types

t()

@type t() :: %Amarula.Content.GroupInvite{
  caption: String.t() | nil,
  code: String.t() | nil,
  expiration: integer() | nil,
  group: Amarula.Address.t() | nil,
  group_name: String.t() | nil
}

Functions

from_proto(m)

@spec from_proto(struct()) :: t()

Normalize a %Proto.Message.GroupInviteMessage{} into a %Amarula.Content.GroupInvite{}.