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