Message send pipeline.
Summary
Functions
Sends a generic content map to the specified JID, converting maps to WAProto messages.
Serializes, encrypts, and transmits a pre-constructed WAProto message to a specific JID.
Uploads a new status update to all valid contacts via status broadcast channel.
Types
@type context() :: %{ :signal_repository => BaileysEx.Signal.Repository.t(), :signal_store => BaileysEx.Signal.Store.t(), :me_id => String.t(), optional(:device_identity) => binary(), optional(:enable_recent_message_cache) => boolean(), optional(:me_lid) => String.t(), optional(:store_ref) => BaileysEx.Connection.Store.Ref.t(), optional(:query_fun) => (BaileysEx.BinaryNode.t() -> {:ok, BaileysEx.BinaryNode.t()} | {:error, term()}), optional(:send_node_fun) => (BaileysEx.BinaryNode.t() -> :ok | {:error, term()}), optional(:socket) => GenServer.server(), optional(:cached_group_metadata) => (String.t() -> {:ok, map()} | nil), optional(:group_metadata_fun) => (String.t() -> {:ok, map()} | {:error, term()}) }
@type proto_message() :: struct()
@type send_result() :: %{ id: String.t(), jid: BaileysEx.JID.t(), message: proto_message(), timestamp: integer() }
Functions
@spec send(context(), BaileysEx.JID.t(), map(), keyword()) :: {:ok, send_result(), context()} | {:error, term()}
Sends a generic content map to the specified JID, converting maps to WAProto messages.
@spec send_proto(context(), BaileysEx.JID.t(), proto_message(), keyword()) :: {:ok, send_result(), context()} | {:error, term()}
Serializes, encrypts, and transmits a pre-constructed WAProto message to a specific JID.
Uploads a new status update to all valid contacts via status broadcast channel.