ExWapp.Session.Worker.Outbound (ExWapp v0.1.2)

Copy Markdown View Source

Coordinates outbound sends from the session worker.

The module selects direct or group delivery, prepares Signal sessions, delegates device discovery and encryption, sends protocol nodes, and records delivery metadata. Message construction remains separate from the WebSocket transport.

Summary

Functions

Sends an internal protocol message directly to the account's primary device.

Sends a constructed WhatsApp protobuf message through the normal outbound pipeline.

Sends text or an optional prebuilt protobuf payload through the session pipeline.

Functions

send_peer_proto_worker(session_pid, state, proto)

@spec send_peer_proto_worker(pid(), map(), WAWebProtobufsE2E.Message.t()) ::
  {:ok, String.t()} | {:error, term()}

Sends an internal protocol message directly to the account's primary device.

send_proto_worker(session_pid, state, jid, proto, opts \\ [])

@spec send_proto_worker(
  pid(),
  map(),
  String.t(),
  WAWebProtobufsE2E.Message.t(),
  keyword()
) ::
  {:ok, String.t()} | {:error, term()}

Sends a constructed WhatsApp protobuf message through the normal outbound pipeline.

send_text_worker(session_pid, state, jid, text, opts \\ [])

@spec send_text_worker(pid(), map(), String.t(), outbound_text(), keyword()) ::
  {:ok, String.t()} | {:error, term()}

Sends text or an optional prebuilt protobuf payload through the session pipeline.