pub async fn room_member_search_by_string(
        &mut self,
        room_id: String,
        query_str: String,
    ) -> Result<Vec<String>, PuppetError> {
        debug!("room_member_search_by_string(query_str = {})", query_str);
        let search_by_id = self
            .room_member_search(
                room_id.clone(),
                RoomMemberQueryFilter {
                    name: Some(query_str.clone()),
                    room_alias: None,
                    name_regex: None,
                    room_alias_regex: None,
                },
            )
            .await;
        let search_by_alias = self
            .room_member_search(
                room_id,
                RoomMemberQueryFilter {
                    name: None,
                    room_alias: Some(query_str),
                    name_regex: None,
                    room_alias_regex: None,
                },
            )
            .await;
        let mut filtered_room_member_id_list = vec![];
        if let Ok(room_member_id_list) = search_by_id {
            for room_member_id in room_member_id_list {
                filtered_room_member_id_list.push(room_member_id);
            }
        }
        if let Ok(room_member_id_list) = search_by_alias {
            for room_member_id in room_member_id_list {
                filtered_room_member_id_list.push(room_member_id);
            }
        }
        Ok(filtered_room_member_id_list
            .into_iter()
            .collect::<HashSet<String>>()
            .into_iter()
            .collect::<Vec<String>>())
    }
/// Search room members by string.
Search room members by string.
Search room members by string .
pub async fn room_member_search_by_string(
        &mut self,
        room_id: String,
        query_str: String,
    ) -> Result<Vec<String>, PuppetError> {
        debug!("room_member_search_by_string(query_str = {})", query_str);
        let search_by_id = self
            .room_member_search(
                room_id.clone(),
                RoomMemberQueryFilter {
                    name: Some(query_str.clone()),
                    room_alias: None,
                    name_regex: None,
                    room_alias_regex: None,
                },
            )
            .await;
        let search_by_alias = self
            .room_member_search(
                room_id,
                RoomMemberQueryFilter {
                    name: None,
                    room_alias: Some(query_str),
                    name_regex: None,
                    room_alias_regex: None,
                },
            )
            .await;
        let mut filtered_room_member_id_list = vec![];
        if let Ok(room_member_id_list) = search_by_id {
            for room_member_id in room_member_id_list {
                filtered_room_member_id_list.push(room_member_id);
            }
        }
        if let Ok(room_member_id_list) = search_by_alias {
            for room_member_id in room_member_id_list {
                filtered_room_member_id_list.push(room_member_id);
            }
        }
        Ok(filtered_room_member_id_list
            .into_iter()
            .collect::<HashSet<String>>()
            .into_iter()
            .collect::<Vec<String>>())
    }
pub async fn room_member_search_by_string ( & mut self , room_id : String , query_str : String , ) -> Result < Vec < String > , PuppetError > { debug ! ( " " query_str ) ; let search_by_id = self . room_member_search ( room_id . clone ( ) , RoomMemberQueryFilter { name : Some ( query_str . clone ( ) ) , room_alias : None , name_regex : None , room_alias_regex : None , } , ) . await ; let search_by_alias = self . room_member_search ( room_id , RoomMemberQueryFilter { name : None , room_alias : Some ( query_str ) , name_regex : None , room_alias_regex : None , } , ) . await ; let mut filtered_room_member_id_list = vec ! [ ] ; if let Ok ( room_member_id_list ) = search_by_id { for room_member_id in room_member_id_list { filtered_room_member_id_list . push ( room_member_id ) ; } } if let Ok ( room_member_id_list ) = search_by_alias { for room_member_id in room_member_id_list { filtered_room_member_id_list . push ( room_member_id ) ; } } Ok ( filtered_room_member_id_list . into_iter ( ) . collect :: < HashSet < String > > ( ) . into_iter ( ) . collect :: < Vec < String > > ( ) ) }
Search room members by string.
Search room members by string .
&mut self
room_id
String
query_str
String
&mut self
room_id
String
query_str
String