0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 01:44:02 +01:00

Check if the user is banned when handling 3pid invites

This commit is contained in:
Mark Haines 2016-07-26 16:39:14 +01:00
parent 33d7776473
commit c824b29e77

View file

@ -376,6 +376,10 @@ class Auth(object):
if Membership.INVITE == membership and "third_party_invite" in event.content:
if not self._verify_third_party_invite(event, auth_events):
raise AuthError(403, "You are not invited to this room.")
if target_banned:
raise AuthError(
403, "%s is banned from the room" % (target_user_id,)
)
return True
if Membership.JOIN != membership: