Inbound envelope normalization and sender/payload candidate resolution.
This boundary owns PN/LID envelope mappings, observed-device persistence, local-recipient matching, and deterministic decrypt candidate construction. Signal decryption and message-content decoding remain outside this module.
Summary
Functions
Builds ordered sender and encrypted-payload candidates for Signal decrypt.
Determines whether an inbound envelope represents a local outgoing message.
Returns normalized local PN/LID recipient identities from state and envelope attributes.
Returns whether a server-attested envelope sender belongs to the local account.
Persists PN/LID pairs observed on an inbound message envelope.
Persists device JIDs observed in the inbound envelope.
Types
@type decrypt_context() :: %{ sender_candidates: [String.t()], payload_candidates: [payload_candidate()], decryptable_payloads: [payload_candidate()] }
Functions
Builds ordered sender and encrypted-payload candidates for Signal decrypt.
Determines whether an inbound envelope represents a local outgoing message.
Returns normalized local PN/LID recipient identities from state and envelope attributes.
Returns whether a server-attested envelope sender belongs to the local account.
Group stanzas use participant as the actual sender; direct stanzas fall back
to from. Both PN and LID identities, with or without a device suffix, are
accepted. This predicate deliberately ignores message payload claims such as
from_me because self-only protocol messages must be authorized from envelope
metadata before their contents are applied.
Persists PN/LID pairs observed on an inbound message envelope.
Persists device JIDs observed in the inbound envelope.