2 files changed, 5 insertions, 1 deletions
diff --git a/changelog.d/5702.bugfix b/changelog.d/5702.bugfix
new file mode 100644
index 0000000000..43b6e39b13
--- /dev/null
+++ b/changelog.d/5702.bugfix
@@ -0,0 +1 @@
+Fix 3PID invite to invite association detection in the Tchap room access rules.
diff --git a/synapse/third_party_rules/access_rules.py b/synapse/third_party_rules/access_rules.py
index c8698c66cc..e3f97bdf3a 100644
--- a/synapse/third_party_rules/access_rules.py
+++ b/synapse/third_party_rules/access_rules.py
@@ -454,5 +454,8 @@ class RoomAccessRules(object):
invite (EventBase): The m.room.member event with "invite" membership.
threepid_invite_token (str): The state key from the 3PID invite.
"""
- token = invite.content.get("third_party_signed", {}).get("token", "")
+ token = invite.content.get(
+ "third_party_invite", {},
+ ).get("signed", {}).get("token", "")
+
return token == threepid_invite_token
|