summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2016-12-15 15:40:28 +0000
committerGitHub <noreply@github.com>2016-12-15 15:40:28 +0000
commit35129ac998f841518e492d357a913f7368b5278d (patch)
tree90a04591926c402daeb1a6023b2a8b39fb9c0701 /synapse
parentMerge pull request #1702 from manuroe/mac_install_update (diff)
parentMerge branch 'develop' of github.com:matrix-org/synapse into erikj/room_list (diff)
downloadsynapse-35129ac998f841518e492d357a913f7368b5278d.tar.xz
Merge pull request #1698 from matrix-org/erikj/room_list
Fix caching on public room list
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/room_list.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/room_list.py b/synapse/handlers/room_list.py
index 1e883b23f6..667223df0c 100644
--- a/synapse/handlers/room_list.py
+++ b/synapse/handlers/room_list.py
@@ -62,7 +62,7 @@ class RoomListHandler(BaseHandler):
                 appservice and network id to use an appservice specific one.
                 Setting to None returns all public rooms across all lists.
         """
-        if search_filter or network_tuple is not (None, None):
+        if search_filter or (network_tuple and network_tuple.appservice_id is not None):
             # We explicitly don't bother caching searches or requests for
             # appservice specific lists.
             return self._get_public_room_list(
@@ -73,7 +73,9 @@ class RoomListHandler(BaseHandler):
         if not result:
             result = self.response_cache.set(
                 (limit, since_token),
-                self._get_public_room_list(limit, since_token)
+                self._get_public_room_list(
+                    limit, since_token, network_tuple=network_tuple
+                )
             )
         return result