Receipt node construction and receipt-event parsing.
Summary
Functions
Builds an ACK/NACK stanza for a received node.
Constructs a receipt node (delivery, read, played, etc.) for the given message IDs.
Parses incoming receipt nodes and generates runtime update events.
Aggregates message keys and sends read receipts according to privacy settings.
Builds and sends a receipt node using the provided sender function.
Types
Functions
@spec build_ack_stanza( BaileysEx.BinaryNode.t(), non_neg_integer() | nil, String.t() | nil ) :: BaileysEx.BinaryNode.t()
Builds an ACK/NACK stanza for a received node.
Mirrors Baileys rc10 buildAckStanza/3: copies the stanza id, source,
class, participant, recipient, and type, and includes from for message
ACKs when the local device JID is known.
@spec build_receipt_node( String.t(), String.t() | nil, [String.t()], receipt_type(), keyword() ) :: BaileysEx.BinaryNode.t()
Constructs a receipt node (delivery, read, played, etc.) for the given message IDs.
@spec process_receipt(BaileysEx.BinaryNode.t(), GenServer.server()) :: :ok
Parses incoming receipt nodes and generates runtime update events.
@spec read_messages( (BaileysEx.BinaryNode.t() -> :ok | {:error, term()}), [map()], map(), keyword() ) :: :ok | {:error, term()}
Aggregates message keys and sends read receipts according to privacy settings.
@spec send_receipt( (BaileysEx.BinaryNode.t() -> :ok | {:error, term()}), String.t(), String.t() | nil, [String.t()], receipt_type(), keyword() ) :: :ok | {:error, term()}
Builds and sends a receipt node using the provided sender function.