From 08c5181a8dfcc3977c422797b876bcfddf75ab4f Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Thu, 9 Jul 2020 12:48:15 +0100 Subject: [PATCH] Fix `can only concatenate list (not "tuple") to list` exception (#7810) It seems auth_events can be either a list or a tuple, depending on Things. --- changelog.d/7810.bugfix | 1 + synapse/handlers/room_member.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/7810.bugfix diff --git a/changelog.d/7810.bugfix b/changelog.d/7810.bugfix new file mode 100644 index 000000000000..2772eeb0db89 --- /dev/null +++ b/changelog.d/7810.bugfix @@ -0,0 +1 @@ +Fix 'stuck invites' which happen when we are unable to reject a room invite received over federation. diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py index 178d7db94e3b..41adaf3bf374 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py @@ -1072,7 +1072,7 @@ async def _locally_reject_invite( alg, h = compute_event_reference_hash(invite_event) invite_hash = (invite_event.event_id, {alg: encode_base64(h)}) - auth_events = invite_event.auth_events + (invite_hash,) + auth_events = tuple(invite_event.auth_events) + (invite_hash,) prev_events = (invite_hash,) # we cap depth of generated events, to ensure that they are not