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 rulespull/5815/head dinsic_2019-07-18
commit
4dc2eda1d3
|
|
@ -0,0 +1 @@
|
|||
Fix 3PID invite to invite association detection in the Tchap room access rules.
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue