diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-09-27 15:13:39 +0100 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-09-27 15:13:39 +0100 |
commit | 72a2708ac6335985eb5171f5685f73d2ea120a2e (patch) | |
tree | f919cf118ccc6fd94ef57c78e149f1ea4abf5705 /synapse/handlers/deactivate_account.py | |
parent | Reject pending invites on deactivation (diff) | |
download | synapse-72a2708ac6335985eb5171f5685f73d2ea120a2e.tar.xz |
Fixup and add some logging
Diffstat (limited to 'synapse/handlers/deactivate_account.py')
-rw-r--r-- | synapse/handlers/deactivate_account.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/synapse/handlers/deactivate_account.py b/synapse/handlers/deactivate_account.py index 9815365f54..763fea3a24 100644 --- a/synapse/handlers/deactivate_account.py +++ b/synapse/handlers/deactivate_account.py @@ -122,7 +122,7 @@ class DeactivateAccountHandler(BaseHandler): # Reject all pending invites for the user, so that it doesn't show up in the # invitees list of rooms. - self._reject_pending_invites_for_user(user_id) + yield self._reject_pending_invites_for_user(user_id) # Remove all information on the user from the account_validity table. if self._account_validity_enabled: @@ -133,6 +133,7 @@ class DeactivateAccountHandler(BaseHandler): return identity_server_supports_unbinding + @defer.inlineCallbacks def _reject_pending_invites_for_user(self, user_id): """Reject pending invites addressed to a given user ID. @@ -142,6 +143,8 @@ class DeactivateAccountHandler(BaseHandler): user = UserID.from_string(user_id) pending_invites = yield self.store.get_invited_rooms_for_user(user_id) + logger.info(pending_invites) + for room in pending_invites: try: yield self._room_member_handler.update_membership( @@ -152,6 +155,11 @@ class DeactivateAccountHandler(BaseHandler): ratelimit=False, require_consent=False, ) + logger.info( + "Rejected invite for user %r in room %r", + user_id, + room.room_id, + ) except Exception: logger.exception( "Failed to reject invite for user %r in room %r:" |