mirror of
https://github.com/chatmail/core.git
synced 2026-04-18 05:56:31 +03:00
feat: Don't send a notification when a group member left (#6575)
When there is a broken group (which might happen with multi-transport), people want to leave it. The problem is that every "Group left" message notifies all other members and pops up the chat, so that other members also want to leave the group. This PR makes it so that "Group left" messages don't create a notification, don't cause a number-in-a-cirle badge counter on the chat, and don't sort up the chat in the chatlist. If a group is deleted, then the group won't pop up when someone leaves it; this worked fine already before this PR, and there also is a test for it.
This commit is contained in:
@@ -653,12 +653,14 @@ def test_withdraw_securejoin_qr(acfactory):
|
||||
bob_chat = bob.secure_join(qr_code)
|
||||
bob.wait_for_securejoin_joiner_success()
|
||||
|
||||
alice.clear_all_events()
|
||||
|
||||
snapshot = bob.get_message_by_id(bob.wait_for_incoming_msg_event().msg_id).get_snapshot()
|
||||
assert snapshot.text == "Member Me ({}) added by {}.".format(bob.get_config("addr"), alice.get_config("addr"))
|
||||
assert snapshot.chat.get_basic_snapshot().is_protected
|
||||
bob_chat.leave()
|
||||
|
||||
snapshot = alice.get_message_by_id(alice.wait_for_incoming_msg_event().msg_id).get_snapshot()
|
||||
snapshot = alice.get_message_by_id(alice.wait_for_msgs_changed_event().msg_id).get_snapshot()
|
||||
assert snapshot.text == "Group left by {}.".format(bob.get_config("addr"))
|
||||
|
||||
logging.info("Alice withdraws QR code.")
|
||||
|
||||
Reference in New Issue
Block a user