Session assertion helpers aligned with Baileys rc.9 assertSessions.
Summary
Functions
Validates that active E2E sessions exist for the specified JIDs, fetching any missing pre-keys.
Decodes E2E session pre-keys from the server payload and injects them into the signal repository.
Types
@type context() :: %{ :signal_repository => BaileysEx.Signal.Repository.t(), optional(:query_fun) => (BaileysEx.BinaryNode.t() -> {:ok, BaileysEx.BinaryNode.t()} | {:error, term()}), optional(atom()) => term() }
Functions
@spec assert_sessions(context(), [String.t()], keyword()) :: {:ok, context(), boolean()} | {:error, term()}
Validates that active E2E sessions exist for the specified JIDs, fetching any missing pre-keys.
@spec parse_and_inject_e2e_sessions( BaileysEx.BinaryNode.t(), BaileysEx.Signal.Repository.t() ) :: {:ok, BaileysEx.Signal.Repository.t()} | {:error, term()}
Decodes E2E session pre-keys from the server payload and injects them into the signal repository.