diff options
author | Erik Johnston <erikj@jki.re> | 2018-08-24 16:53:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-24 16:53:11 +0100 |
commit | 48b04c4a4cc79f6fca6b55dcd929d9b9f49871cf (patch) | |
tree | 0eea86e76362d0a405cccb85d9a02c9028745a93 /synapse | |
parent | Merge pull request #3755 from matrix-org/erikj/fix_server_notice_tags (diff) | |
parent | Newsfile (diff) | |
download | synapse-48b04c4a4cc79f6fca6b55dcd929d9b9f49871cf.tar.xz |
Merge pull request #3756 from matrix-org/erikj/fix_tags_server_notices
Fix checking if service notice room is already tagged
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/server_notices/resource_limits_server_notices.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/synapse/server_notices/resource_limits_server_notices.py b/synapse/server_notices/resource_limits_server_notices.py index 893b9001cd..5d86114e09 100644 --- a/synapse/server_notices/resource_limits_server_notices.py +++ b/synapse/server_notices/resource_limits_server_notices.py @@ -146,11 +146,10 @@ class ResourceLimitsServerNotices(object): user_id(str): the user in question room_id(str): the server notices room for that user """ - tags = yield self._store.get_tags_for_user(user_id) - server_notices_tags = tags.get(room_id) + tags = yield self._store.get_tags_for_room(user_id, room_id) need_to_set_tag = True - if server_notices_tags: - if server_notices_tags.get(SERVER_NOTICE_ROOM_TAG): + if tags: + if SERVER_NOTICE_ROOM_TAG in tags: # tag already present, nothing to do here need_to_set_tag = False if need_to_set_tag: |