summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorreivilibre <oliverw@matrix.org>2022-04-01 15:55:09 +0100
committerGitHub <noreply@github.com>2022-04-01 15:55:09 +0100
commitc4cf916ed7d09d13d84f964dd683e1ecfd21815b (patch)
tree56a9673e2b30190f6f6b1a896bc987949ef1aaa6 /synapse/handlers/room.py
parentBurn `check_signature` dev script. (#12351) (diff)
downloadsynapse-c4cf916ed7d09d13d84f964dd683e1ecfd21815b.tar.xz
Default to `private` room visibility rather than `public` when a client does not specify one, according to spec. (#12350)
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 092e185c99..51a08fd2c0 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -771,7 +771,9 @@ class RoomCreationHandler:
                 % (user_id,),
             )
 
-        visibility = config.get("visibility", None)
+        # The spec says rooms should default to private visibility if
+        # `visibility` is not specified.
+        visibility = config.get("visibility", "private")
         is_public = visibility == "public"
 
         room_id = await self._generate_room_id(