mirror of
https://github.com/chatmail/core.git
synced 2026-04-21 15:36:30 +03:00
fix: Only omit group changes messages if SELF is really added (#7220)
If a self-addition message is received, but we're already in the group, there must be no hidden member changes.
This commit is contained in:
@@ -3078,7 +3078,9 @@ async fn apply_group_changes(
|
||||
if let Some(removed_id) = removed_id {
|
||||
removed_ids.remove(&removed_id);
|
||||
}
|
||||
let group_changes_msgs = if self_added {
|
||||
let group_changes_msgs = if !chat_contacts.contains(&ContactId::SELF)
|
||||
&& new_chat_contacts.contains(&ContactId::SELF)
|
||||
{
|
||||
Vec::new()
|
||||
} else {
|
||||
group_changes_msgs(context, &added_ids, &removed_ids, chat.id).await?
|
||||
|
||||
@@ -783,7 +783,12 @@ async fn test_verified_chat_editor_reordering() -> Result<()> {
|
||||
|
||||
tcm.section("Charlie receives member added message");
|
||||
charlie.recv_msg(&sent_member_added_msg).await;
|
||||
|
||||
charlie
|
||||
.golden_test_chat(
|
||||
charlie_received_xdc.chat_id,
|
||||
"verified_chats_editor_reordering",
|
||||
)
|
||||
.await;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user