diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-05-18 11:18:39 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-05-18 11:18:39 +0100 |
commit | 26305788fe23448d65d0cd0358df547e816574f2 (patch) | |
tree | 1dafe1e3220105e43b4158008ebe482e7d5400a0 /synapse/server_notices/server_notices_manager.py | |
parent | Replace inline docstrings with "Attributes" in class docstring (diff) | |
download | synapse-26305788fe23448d65d0cd0358df547e816574f2.tar.xz |
Make sure we reject attempts to invite the notices user
Diffstat (limited to 'synapse/server_notices/server_notices_manager.py')
-rw-r--r-- | synapse/server_notices/server_notices_manager.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/server_notices/server_notices_manager.py b/synapse/server_notices/server_notices_manager.py index 0d48aeb95e..15086600ed 100644 --- a/synapse/server_notices/server_notices_manager.py +++ b/synapse/server_notices/server_notices_manager.py @@ -78,6 +78,11 @@ class ServerNoticesManager(object): ) system_mxid = self._config.server_notices_mxid for room in rooms: + # it's worth noting that there is an asymmetry here in that we + # expect the user to be invited or joined, but the system user must + # be joined. This is kinda deliberate, in that if somebody somehow + # manages to invite the system user to a room, that doesn't make it + # the server notices room. user_ids = yield self._store.get_users_in_room(room.room_id) if system_mxid in user_ids: # we found a room which our user shares with the system notice |