0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 23:53:51 +01:00

Catch failure to part user from room

This commit is contained in:
David Baker 2018-05-10 12:23:53 +01:00
parent 217bc53c98
commit 6b49628e3b

View file

@ -114,10 +114,16 @@ class DeactivateAccountHandler(BaseHandler):
rooms_for_user = yield self.store.get_rooms_for_user(user_id)
for room_id in rooms_for_user:
logger.info("User parter parting %r from %r", user_id, room_id)
yield self._room_member_handler.update_membership(
create_requester(user),
user,
room_id,
"leave",
ratelimit=False,
)
try:
yield self._room_member_handler.update_membership(
create_requester(user),
user,
room_id,
"leave",
ratelimit=False,
)
except Exception:
logger.exception(
"Failed to part user %r from room %r: ignoring and continuing",
user_id, room_id,
)