1
0

Merge pull request #5702 from matrix-org/babolivier/3pid-invite

Fix check of the association between a 3PID invite and the subsequent m.room.member event in the 3rd party rules
This commit is contained in:
Brendan Abolivier
2019-07-18 13:38:05 +02:00
committed by GitHub
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
Fix 3PID invite to invite association detection in the Tchap room access rules.
+4 -1
View File
@@ -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