Skip to content

Commit 02f9f7a

Browse files
jmartinesppoljar
authored andcommitted
refactor(sdk): Use Room::is_dm instead of Room::is_direct for global room search too
1 parent 44621a4 commit 02f9f7a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

crates/matrix-sdk/src/message_search.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ impl GlobalSearchBuilder {
221221
pub async fn only_dm_rooms(mut self) -> Result<Self, crate::Error> {
222222
let mut to_remove = HashSet::new();
223223
for room in &self.room_set {
224-
if !room.is_direct().await? {
224+
if !room.is_dm().await? {
225225
to_remove.insert(room.room_id().to_owned());
226226
}
227227
}
@@ -233,7 +233,7 @@ impl GlobalSearchBuilder {
233233
pub async fn no_dms(mut self) -> Result<Self, crate::Error> {
234234
let mut to_remove = HashSet::new();
235235
for room in &self.room_set {
236-
if room.is_direct().await? {
236+
if room.is_dm().await? {
237237
to_remove.insert(room.room_id().to_owned());
238238
}
239239
}

0 commit comments

Comments
 (0)