Make sure we reject attempts to invite the notices user

This commit is contained in:
Richard van der Hoff 2018-05-18 11:18:39 +01:00
parent d10707c810
commit 26305788fe
3 changed files with 20 additions and 0 deletions

View file

@ -309,6 +309,13 @@ class RoomMemberHandler(object):
)
if effective_membership_state == Membership.INVITE:
# block any attempts to invite the server notices mxid
if target.to_string() == self._server_notices_mxid:
raise SynapseError(
http_client.FORBIDDEN,
"Cannot invite this user",
)
block_invite = False
if (self._server_notices_mxid is not None and