summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-03-23 13:49:10 +0000
committerErik Johnston <erik@matrix.org>2016-03-23 13:59:34 +0000
commit84afeb41f32acdab22036b8c1efbb402eef31cd7 (patch)
treeec51199f1fed82d70cd560625472cc59d3be48b1 /synapse/handlers
parentEnsure published rooms have public join rules (diff)
downloadsynapse-84afeb41f32acdab22036b8c1efbb402eef31cd7.tar.xz
Ensure all old public rooms have aliases
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/room.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 7062414adf..d5c56ce0d6 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -119,7 +119,8 @@ class RoomCreationHandler(BaseHandler):
 
         invite_3pid_list = config.get("invite_3pid", [])
 
-        is_public = config.get("visibility", None) == "public"
+        visibility = config.get("visibility", None)
+        is_public = visibility == "public"
 
         # autogen room IDs and try to create it. We may clash, so just
         # try a few times till one goes through, giving up eventually.
@@ -155,9 +156,9 @@ class RoomCreationHandler(BaseHandler):
 
         preset_config = config.get(
             "preset",
-            RoomCreationPreset.PUBLIC_CHAT
-            if is_public
-            else RoomCreationPreset.PRIVATE_CHAT
+            RoomCreationPreset.PRIVATE_CHAT
+            if visibility == "private"
+            else RoomCreationPreset.PUBLIC_CHAT
         )
 
         raw_initial_state = config.get("initial_state", [])