mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 22:46:29 +03:00
fix: Only add "member added/removed" messages if they actually do that (#5992)
There were many cases in which "member added/removed" messages were added to chats even if they actually do nothing because a member is already added or removed. But primarily this fixes a scenario when Alice has several devices and shares an invite link somewhere, and both their devices handle the SecureJoin and issue `ChatGroupMemberAdded` messages so all other members see a duplicated group member addition.
This commit is contained in:
@@ -5371,7 +5371,7 @@ mod tests {
|
||||
|
||||
// Eventually, first removal message arrives.
|
||||
// This has no effect.
|
||||
bob.recv_msg(&remove1).await;
|
||||
bob.recv_msg_trash(&remove1).await;
|
||||
assert_eq!(get_chat_contacts(&bob, bob_chat_id).await?.len(), 2);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user