1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index b49b917b6e..84a11a3010 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -916,10 +916,8 @@ class RoomCreationHandler:
if not self.config.roomdirectory.is_publishing_room_allowed(
user_id, room_id, room_aliases
):
- # Let's just return a generic message, as there may be all sorts of
- # reasons why we said no. TODO: Allow configurable error messages
- # per alias creation rule?
- raise SynapseError(403, "Not allowed to publish room")
+ # allow room creation to continue but do not publish room
+ await self.store.set_room_is_public(room_id, False)
directory_handler = self.hs.get_directory_handler()
if room_alias:
|