BaileysEx.Message.NotificationHandler (baileys_ex v0.1.0-alpha.9)

Copy Markdown View Source

Message-layer notification handling aligned with Baileys rc.9.

This module owns the non-auth notification cases that produce messaging, group, newsletter, and account-side effects above the raw socket layer.

Summary

Functions

Processes a raw envelope notification node and maps it to runtime events.

Types

context()

@type context() :: %{
  optional(:event_emitter) => GenServer.server(),
  optional(:me_id) => String.t(),
  optional(:store_privacy_token_fun) => (String.t(),
                                         binary(),
                                         String.t()
                                         | nil ->
                                           :ok | {:error, term()}),
  optional(:handle_encrypt_notification_fun) => (BaileysEx.BinaryNode.t() ->
                                                   term()),
  optional(:device_notification_fun) => (BaileysEx.BinaryNode.t() -> term()),
  optional(:signal_store) => BaileysEx.Signal.Store.t(),
  optional(:signal_repository) => BaileysEx.Signal.Repository.t(),
  optional(:resync_app_state_fun) => (String.t() -> term()),
  optional(:now_seconds) => integer()
}

Functions

process_node(node, context)

@spec process_node(BaileysEx.BinaryNode.t(), context()) :: :ok

Processes a raw envelope notification node and maps it to runtime events.