Receipt node construction and receipt-event parsing.
Summary
Functions
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_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.