diff options
author | Erik Johnston <erik@matrix.org> | 2016-12-06 10:43:48 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-12-06 16:12:27 +0000 |
commit | f32fb6555246adec537bfbca1ddca19e8fe5f4ba (patch) | |
tree | 1e275b7f28f35e8954144e4b1568a89ebb968192 /synapse/handlers/directory.py | |
parent | Travis config (#1674) (diff) | |
download | synapse-f32fb6555246adec537bfbca1ddca19e8fe5f4ba.tar.xz |
Add new API appservice specific public room list
Diffstat (limited to 'synapse/handlers/directory.py')
-rw-r--r-- | synapse/handlers/directory.py | 12 |
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" + ) |