Amarula.Content.Contact (amarula v0.3.0)

View Source

A received contact card (content of a %Amarula.Msg{type: :contact}, and each element of a :contacts array).

  • :display_name — the contact's shown name.
  • :vcard — the raw vCard string (parse it with any vCard library if you need structured fields).

Summary

Functions

Normalize a %Proto.Message.ContactMessage{} into a %Amarula.Content.Contact{}.

Types

t()

@type t() :: %Amarula.Content.Contact{
  display_name: String.t() | nil,
  vcard: String.t() | nil
}

Functions

from_proto(m)

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

Normalize a %Proto.Message.ContactMessage{} into a %Amarula.Content.Contact{}.