mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 19:06:35 +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:
@@ -301,6 +301,13 @@ class Account:
|
||||
if event.kind == EventType.INCOMING_MSG:
|
||||
return event
|
||||
|
||||
def wait_for_msgs_changed_event(self):
|
||||
"""Wait for messages changed event and return it."""
|
||||
while True:
|
||||
event = self.wait_for_event()
|
||||
if event.kind == EventType.MSGS_CHANGED:
|
||||
return event
|
||||
|
||||
def wait_for_incoming_msg(self):
|
||||
"""Wait for incoming message and return it.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user