Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5477 from matrix-org/babolivier/third_party_rules…
Browse files Browse the repository at this point in the history
…_3pid
  • Loading branch information
anoadragon453 committed Feb 10, 2020
2 parents 1bce721 + d6328e0 commit 3c9b5d5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions synapse/handlers/room_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,15 @@ def do_3pid_invite(
update=True,
)

can_invite = yield self.third_party_event_rules.check_threepid_can_be_invited(
medium, address, room_id,
)
if not can_invite:
raise SynapseError(
403, "This third-party identifier can not be invited in this room",
Codes.FORBIDDEN,
)

can_invite = yield self.third_party_event_rules.check_threepid_can_be_invited(
medium, address, room_id,
)
Expand Down

0 comments on commit 3c9b5d5

Please sign in to comment.