diff options
author | Erik Johnston <erik@matrix.org> | 2015-03-06 16:24:05 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-03-06 16:24:05 +0000 |
commit | 9ccccd4874fe827baa2583829602663d1936b0ae (patch) | |
tree | 8bafc74f300576fe687a5df829ef094b311d8dfc | |
parent | Update CHANGES (diff) | |
download | synapse-9ccccd4874fe827baa2583829602663d1936b0ae.tar.xz |
When setting display name more graciously handle failures to update room state.
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/profile.py | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py index 03b2159c53..2ddf9d5378 100644 --- a/synapse/handlers/profile.py +++ b/synapse/handlers/profile.py @@ -212,10 +212,16 @@ class ProfileHandler(BaseHandler): ) msg_handler = self.hs.get_handlers().message_handler - yield msg_handler.create_and_send_event({ - "type": EventTypes.Member, - "room_id": j.room_id, - "state_key": user.to_string(), - "content": content, - "sender": user.to_string() - }, ratelimit=False) + try: + yield msg_handler.create_and_send_event({ + "type": EventTypes.Member, + "room_id": j.room_id, + "state_key": user.to_string(), + "content": content, + "sender": user.to_string() + }, ratelimit=False) + except Exception as e: + logger.warn( + "Failed to update join event for room %s - %s", + j.room_id, str(e.message) + ) |