summary refs log tree commit diff
path: root/synapse/handlers/user_directory.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-12-16 08:46:37 -0500
committerGitHub <noreply@github.com>2020-12-16 08:46:37 -0500
commitbe2db93b3c14396d53d30f8d5f92db014453487b (patch)
tree45d487763583c8791da8f62f9e9949f72ee21edb /synapse/handlers/user_directory.py
parentPreparatory refactoring of the SamlHandlerTestCase (#8938) (diff)
downloadsynapse-be2db93b3c14396d53d30f8d5f92db014453487b.tar.xz
Do not assume that the contents dictionary includes history_visibility. (#8945)
Diffstat (limited to 'synapse/handlers/user_directory.py')
-rw-r--r--synapse/handlers/user_directory.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/user_directory.py b/synapse/handlers/user_directory.py
index f263a638f8..3d80371f06 100644
--- a/synapse/handlers/user_directory.py
+++ b/synapse/handlers/user_directory.py
@@ -16,7 +16,7 @@
 import logging
 
 import synapse.metrics
-from synapse.api.constants import EventTypes, JoinRules, Membership
+from synapse.api.constants import EventTypes, HistoryVisibility, JoinRules, Membership
 from synapse.handlers.state_deltas import StateDeltasHandler
 from synapse.metrics.background_process_metrics import run_as_background_process
 from synapse.storage.roommember import ProfileInfo
@@ -250,7 +250,7 @@ class UserDirectoryHandler(StateDeltasHandler):
                 prev_event_id,
                 event_id,
                 key_name="history_visibility",
-                public_value="world_readable",
+                public_value=HistoryVisibility.WORLD_READABLE,
             )
         elif typ == EventTypes.JoinRules:
             change = await self._get_key_change(