Skip to content

Commit

Permalink
Ignore changes from non-chat members for old algorithm.
Browse files Browse the repository at this point in the history
  • Loading branch information
link2xt committed Jan 7, 2025
1 parent 8893c7c commit e6bc930
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/receive_imf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2182,6 +2182,8 @@ async fn apply_group_changes(

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

// Whether to rebuild the member list from scratch.
let recreate_member_list = self_added;
Expand Down Expand Up @@ -2317,7 +2319,7 @@ async fn apply_group_changes(
expected_timestamps_count
);
}
} else {
} else if is_from_in_chat {
let mut new_members = HashSet::from_iter(to_ids.iter().copied());
new_members.insert(ContactId::SELF);
if !from_id.is_special() {
Expand Down

0 comments on commit e6bc930

Please sign in to comment.