mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
invitations: Send 'invites_changed' event for invitations events.
Fixes #7665 In case of invitation events, 'invites_changed' event without any real payload is sent to all the realm admins and the user. The event is handled by reloading the list to view recent changes. Commit tweaked by shubhamdhama: * Send an `invite_changed` event when an user accept an invite. Also, added the test for the same. * No need to delete the invite list in frontend, current logic handles the case when the invite data is changed properly. * Extracted the common logic for sending an event into `notify_invites_changed`.
This commit is contained in:
@@ -607,6 +607,8 @@ def apply_event(state: Dict[str, Any],
|
||||
elif event['type'] == "update_global_notifications":
|
||||
assert event['notification_name'] in UserProfile.notification_setting_types
|
||||
state[event['notification_name']] = event['setting']
|
||||
elif event['type'] == "invites_changed":
|
||||
pass
|
||||
elif event['type'] == "user_group":
|
||||
if event['op'] == 'add':
|
||||
state['realm_user_groups'].append(event['group'])
|
||||
|
||||
Reference in New Issue
Block a user