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

Copy Markdown View Source

Normalizes wrapped message content and detects the active message type.

Summary

Functions

Extracts the inner text or media struct from template wrappers.

Identifies the active content field type from a parsed Message struct.

Recursively unwraps ephemeral, view-once, edited, and grouping message wrappers.

Functions

extract_message_content(content)

@spec extract_message_content(struct()) :: struct()

Extracts the inner text or media struct from template wrappers.

get_content_type(message)

@spec get_content_type(struct()) :: atom() | nil

Identifies the active content field type from a parsed Message struct.

normalize_content(content)

@spec normalize_content(struct()) :: struct()

Recursively unwraps ephemeral, view-once, edited, and grouping message wrappers.