MessageExt

Trait MessageExt 

Source
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§

Source

fn get_base_message(&self) -> &Message

Recursively unwraps ephemeral/view-once/document_with_caption/edited wrappers to get the core message.

Source

fn is_ephemeral(&self) -> bool

Source

fn is_view_once(&self) -> bool

Source

fn get_caption(&self) -> Option<&str>

Gets the caption for media messages (Image, Video, Document).

Source

fn text_content(&self) -> Option<&str>

Gets the primary text content of a message (from conversation or extendedTextMessage).

Implementations on Foreign Types§

Source§

impl MessageExt for Message

Implementors§