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

Copy Markdown View Source

History-sync download and payload processing.

This module mirrors Baileys' history helper boundary: resolve the notification payload, inflate it, decode the minimal HistorySync proto surface, and return the chats/contacts/messages/mapping data needed by the messaging runtime.

Summary

Functions

Processes a history sync notification, downloading and inflating the payload if necessary.

Types

context()

@type context() :: %{
  optional(:history_sync_download_fun) => (map(), map() ->
                                             {:ok, binary()} | {:error, term()}),
  optional(:inflate_fun) => (binary() -> {:ok, binary()} | {:error, term()}),
  optional(atom()) => term()
}

Functions

process_notification(notification, received_message, context)

@spec process_notification(map(), map(), context()) :: {:ok, map()} | {:error, term()}

Processes a history sync notification, downloading and inflating the payload if necessary.