summary refs log tree commit diff
path: root/synapse/handlers/directory.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-12-06 10:43:48 +0000
committerErik Johnston <erik@matrix.org>2016-12-06 16:12:27 +0000
commitf32fb6555246adec537bfbca1ddca19e8fe5f4ba (patch)
tree1e275b7f28f35e8954144e4b1568a89ebb968192 /synapse/handlers/directory.py
parentTravis config (#1674) (diff)
downloadsynapse-f32fb6555246adec537bfbca1ddca19e8fe5f4ba.tar.xz
Add new API appservice specific public room list
Diffstat (limited to 'synapse/handlers/directory.py')
-rw-r--r--synapse/handlers/directory.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/handlers/directory.py b/synapse/handlers/directory.py
index c00274afc3..08ed513ef8 100644
--- a/synapse/handlers/directory.py
+++ b/synapse/handlers/directory.py
@@ -339,3 +339,15 @@ class DirectoryHandler(BaseHandler):
         yield self.auth.check_can_change_room_list(room_id, requester.user)
 
         yield self.store.set_room_is_public(room_id, visibility == "public")
+
+    @defer.inlineCallbacks
+    def edit_published_appservice_room_list(self, appservice_id, network_id,
+                                            room_id, visibility):
+        """Edit the appservice/network specific public room list.
+        """
+        if visibility not in ["public", "private"]:
+            raise SynapseError(400, "Invalid visibility setting")
+
+        yield self.store.set_room_is_public_appservice(
+            room_id, appservice_id, network_id, visibility == "public"
+        )