diff options
author | Erik Johnston <erik@matrix.org> | 2016-04-05 12:44:39 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-04-05 12:44:39 +0100 |
commit | b29f98377d1966bc348d83cf6ba38b434a1a794e (patch) | |
tree | 80984de66275e89ad1372fe0d4ac7faaaf5e0c74 /synapse/handlers/room_member.py | |
parent | Merge pull request #690 from matrix-org/erikj/member (diff) | |
parent | Fix stuck invites (diff) | |
download | synapse-b29f98377d1966bc348d83cf6ba38b434a1a794e.tar.xz |
Merge pull request #691 from matrix-org/erikj/member
Fix stuck invites
Diffstat (limited to 'synapse/handlers/room_member.py')
-rw-r--r-- | synapse/handlers/room_member.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py index f232081970..fe2315df8f 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py @@ -258,10 +258,20 @@ class RoomMemberHandler(BaseHandler): else: # send the rejection to the inviter's HS. remote_room_hosts = remote_room_hosts + [inviter.domain] - ret = yield self.reject_remote_invite( - target.to_string(), room_id, remote_room_hosts - ) - defer.returnValue(ret) + + try: + ret = yield self.reject_remote_invite( + target.to_string(), room_id, remote_room_hosts + ) + defer.returnValue(ret) + except SynapseError as e: + logger.warn("Failed to reject invite: %s", e) + + yield self.store.locally_reject_invite( + target.to_string(), room_id + ) + + defer.returnValue({}) yield self._local_membership_update( requester=requester, |