pub trait MessageExt {
// Required methods
fn get_base_message(&self) -> &Message;
fn is_ephemeral(&self) -> bool;
fn is_view_once(&self) -> bool;
fn get_caption(&self) -> Option<&str>;
fn text_content(&self) -> Option<&str>;
}Expand description
Extension trait for wa::Message
Required Methods§
Sourcefn get_base_message(&self) -> &Message
fn get_base_message(&self) -> &Message
Recursively unwraps ephemeral/view-once/document_with_caption/edited wrappers to get the core message.
fn is_ephemeral(&self) -> bool
fn is_view_once(&self) -> bool
Sourcefn get_caption(&self) -> Option<&str>
fn get_caption(&self) -> Option<&str>
Gets the caption for media messages (Image, Video, Document).
Sourcefn text_content(&self) -> Option<&str>
fn text_content(&self) -> Option<&str>
Gets the primary text content of a message (from conversation or extendedTextMessage).