events: Send invites_changed event if user deactivation revokes invites.

revoke_invites_generated_by_user should send invites_changed event if it
actually revokes some invitations. This is called in the user
deactivatoin codepath.
This commit is contained in:
Mateusz Mandera
2022-01-14 22:54:49 +01:00
committed by Tim Abbott
parent 74d2aea76a
commit f8b06ed952
2 changed files with 20 additions and 0 deletions

View File

@@ -7628,6 +7628,8 @@ def revoke_invites_generated_by_user(user_profile: UserProfile) -> None:
confirmation.expiry_date = now
Confirmation.objects.bulk_update(confirmations_to_revoke, ["expiry_date"])
if len(confirmations_to_revoke):
notify_invites_changed(realm=user_profile.realm)
def do_create_multiuse_invite_link(