Xmtp.Rooms (xmtp_elixir_sdk v0.1.2)

Copy Markdown

Canonical room action facade for product apps.

Summary

Functions

complete_join_signature(manager, room_key, principal, request_id, signature, claims \\ %{})

@spec complete_join_signature(
  module(),
  String.t(),
  Xmtp.Principal.t() | map(),
  String.t(),
  String.t(),
  map()
) :: {:ok, Xmtp.RoomPanel.t()} | {:error, term()}

delete_message(manager, room_key, moderator, message_id)

@spec delete_message(module(), String.t(), Xmtp.Principal.t() | map(), String.t()) ::
  {:ok, Xmtp.RoomPanel.t()} | {:error, term()}

heartbeat(manager, room_key, principal)

@spec heartbeat(module(), String.t(), Xmtp.Principal.t() | map()) :: :ok

invite(manager, room_key, inviter, target, claims \\ %{})

@spec invite(
  module(),
  String.t(),
  Xmtp.Principal.t() | :system,
  Xmtp.Principal.t() | map(),
  map()
) ::
  {:ok, Xmtp.RoomPanel.t()} | {:error, term()}

kick(manager, room_key, moderator, target)

@spec kick(
  module(),
  String.t(),
  Xmtp.Principal.t() | map(),
  Xmtp.Principal.t() | map() | String.t()
) ::
  {:ok, Xmtp.RoomPanel.t()} | {:error, term()}

panel(manager, room_key, principal \\ nil, claims \\ %{})

@spec panel(module(), String.t(), Xmtp.Principal.t() | map() | nil, map()) ::
  {:ok, Xmtp.RoomPanel.t()} | {:error, term()}

request_join(manager, room_key, principal, claims \\ %{})

@spec request_join(module(), String.t(), Xmtp.Principal.t() | map(), map()) ::
  {:ok, Xmtp.RoomPanel.t()} | {:needs_signature, map()} | {:error, term()}

send_message(manager, room_key, principal, body)

@spec send_message(module(), String.t(), Xmtp.Principal.t() | map(), String.t()) ::
  {:ok, Xmtp.RoomPanel.t()} | {:error, term()}