XmtpElixirSdk.DecodedMessage (xmtp_elixir_sdk v0.1.2)

Copy Markdown

Message surface with custom content decoded through a codec registry.

Summary

Types

decode_status()

@type decode_status() :: :decoded | :unknown | :failed

t()

@type t() :: %XmtpElixirSdk.DecodedMessage{
  content: term(),
  content_type: XmtpElixirSdk.Types.ContentTypeId.t(),
  conversation_id: String.t(),
  decode_error: XmtpElixirSdk.Error.t() | nil,
  decode_status: decode_status(),
  delivery_status: XmtpElixirSdk.Types.delivery_status(),
  expires_at: DateTime.t() | nil,
  expires_at_ns: non_neg_integer() | nil,
  fallback: String.t() | nil,
  id: String.t(),
  kind: XmtpElixirSdk.Types.message_kind(),
  num_replies: non_neg_integer(),
  reactions: [t()],
  sender_inbox_id: String.t(),
  sent_at: DateTime.t(),
  sent_at_ns: non_neg_integer()
}

Functions

actions?(decoded_message)

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

attachment?(decoded_message)

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

content_type(decoded_message)

@spec content_type(t()) :: XmtpElixirSdk.Types.ContentTypeId.t()

decoded?(decoded_message)

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

failed?(decoded_message)

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

from_message(message, registry \\ CodecRegistry.new())

group_updated?(decoded_message)

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

intent?(decoded_message)

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

markdown?(decoded_message)

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

multi_remote_attachment?(decoded_message)

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

reaction?(decoded_message)

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

read_receipt?(decoded_message)

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

remote_attachment?(decoded_message)

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

reply?(decoded_message)

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

reply_content_type(decoded_message)

@spec reply_content_type(t()) :: XmtpElixirSdk.Types.ContentTypeId.t() | nil

text?(decoded_message)

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

text_reply?(message)

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

transaction_reference?(decoded_message)

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

unknown?(decoded_message)

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

wallet_send_calls?(decoded_message)

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