mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 13:56:07 -04:00
Fix stuck invites
If rejecting a remote invite fails with an error response don't fail the entire request; instead mark the invite as locally rejected. This fixes the bug where users can get stuck invites which they can neither accept nor reject.
This commit is contained in:
parent
0c53d750e7
commit
df727f2126
4 changed files with 58 additions and 16 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue