Pure decoder for supported WhatsApp message content.
It decodes the E2E Message protobuf and maps supported content (text,
media, location, contact, event) to the internal contract, but does not
parse XML envelopes, decrypt Signal payloads, persist state, or publish
events.
Summary
Functions
Same as apply_media_from_plaintext/2 for an already-decoded message.
Adds decoded media, location, contact, or event fields to a message map.
Distinguishes protocol payloads from user content and extracts message text.
Same as classify_decrypted_content/2 for an already-decoded message.
Decodes an E2E Message payload, returning :error on malformed protobuf.
Reports whether a message is a DeviceSentMessage wrapper (own-device fanout).
Functions
Same as apply_media_from_plaintext/2 for an already-decoded message.
Adds decoded media, location, contact, or event fields to a message map.
@spec classify_decrypted_content(binary(), non_neg_integer()) :: {:protocol | :user_message, binary() | nil}
Distinguishes protocol payloads from user content and extracts message text.
@spec classify_message(WAWebProtobufsE2E.Message.t(), non_neg_integer()) :: {:protocol | :user_message, binary() | nil}
Same as classify_decrypted_content/2 for an already-decoded message.
@spec decode(binary()) :: {:ok, WAWebProtobufsE2E.Message.t()} | :error
Decodes an E2E Message payload, returning :error on malformed protobuf.
Reports whether a message is a DeviceSentMessage wrapper (own-device fanout).