Skip to content

Commit e6bc930

Browse files
committed
Ignore changes from non-chat members for old algorithm.
1 parent 8893c7c commit e6bc930

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/receive_imf.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2182,6 +2182,8 @@ async fn apply_group_changes(
21822182

21832183
let mut chat_contacts =
21842184
HashSet::<ContactId>::from_iter(chat::get_chat_contacts(context, chat_id).await?);
2185+
let is_from_in_chat =
2186+
!chat_contacts.contains(&ContactId::SELF) || chat_contacts.contains(&from_id);
21852187

21862188
// Whether to rebuild the member list from scratch.
21872189
let recreate_member_list = self_added;
@@ -2317,7 +2319,7 @@ async fn apply_group_changes(
23172319
expected_timestamps_count
23182320
);
23192321
}
2320-
} else {
2322+
} else if is_from_in_chat {
23212323
let mut new_members = HashSet::from_iter(to_ids.iter().copied());
23222324
new_members.insert(ContactId::SELF);
23232325
if !from_id.is_special() {

0 commit comments

Comments
 (0)