Decodes inbound plaintext into the canonical message-content contract.
This module is the single recognition point for decrypted text, media, location, contact, event, protocol, and unsupported content. It also keeps the legacy map fields populated for compatibility.
Summary
Functions
Classifies decrypted plaintext and merges canonical plus legacy fields.
Decodes an already-parsed E2E message to canonical inbound content.
Decodes one plaintext protobuf payload to canonical inbound content.
Ensures plain, failed, and already-decoded messages all carry canonical content.
Functions
@spec decode_decrypted(ExWapp.Message.Handler.Inbound.Decryptor.success()) :: map()
Classifies decrypted plaintext and merges canonical plus legacy fields.
@spec decode_message(WAWebProtobufsE2E.Message.t(), binary(), keyword()) :: ExWapp.Message.Content.t()
Decodes an already-parsed E2E message to canonical inbound content.
plaintext is only used for diagnostics and the protocol passthrough payload,
so callers that already hold the decoded struct never re-encode it.
@spec decode_plaintext( binary(), keyword() ) :: ExWapp.Message.Content.t()
Decodes one plaintext protobuf payload to canonical inbound content.
Ensures plain, failed, and already-decoded messages all carry canonical content.