diff --git a/synapse/third_party_rules/access_rules.py b/synapse/third_party_rules/access_rules.py index 521b0347a..e3f97bdf3 100644 --- a/synapse/third_party_rules/access_rules.py +++ b/synapse/third_party_rules/access_rules.py @@ -454,11 +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. """ - if "third_party_signed" in invite.content: - token = invite.content.get("third_party_signed", {}).get("token", "") - else: - token = invite.content.get( - "third_party_invite", {}, - ).get("signed", {}).get("token", "") + token = invite.content.get( + "third_party_invite", {}, + ).get("signed", {}).get("token", "") return token == threepid_invite_token