pub async fn message_find(&self, query: MessageQueryFilter) -> Result<Option<Message<T>>, WechatyError> {
        debug!("message_find(query = {:?})", query);
        if !self.is_logged_in() {
            return Err(WechatyError::NotLoggedIn);
        }
        match self.message_find_all(query).await {
            Ok(message_list) => {
                if message_list.is_empty() {
                    Ok(None)
                } else {
                    Ok(Some(message_list[0].clone()))
                }
            }
            Err(e) => Err(e),
        }
    }
/// Find the first message that matches the query
Find the first message that matches the query
Find the first message that matches the query
pub async fn message_find(&self, query: MessageQueryFilter) -> Result<Option<Message<T>>, WechatyError> {
        debug!("message_find(query = {:?})", query);
        if !self.is_logged_in() {
            return Err(WechatyError::NotLoggedIn);
        }
        match self.message_find_all(query).await {
            Ok(message_list) => {
                if message_list.is_empty() {
                    Ok(None)
                } else {
                    Ok(Some(message_list[0].clone()))
                }
            }
            Err(e) => Err(e),
        }
    }
pub async fn message_find ( & self , query : MessageQueryFilter ) -> Result < Option < Message < T > > , WechatyError > { debug ! ( " " query ) ; if ! self . is_logged_in ( ) { return Err ( WechatyError :: NotLoggedIn ) ; } match self . message_find_all ( query ) . await { Ok ( message_list ) => { if message_list . is_empty ( ) { Ok ( None ) } else { Ok ( Some ( message_list [ 0 ] . clone ( ) ) ) } } Err ( e ) => Err ( e ) , } }
Find the first message that matches the query
Find the first message that matches the query
&self
query
MessageQueryFilter
&self
query
MessageQueryFilter