diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2019-02-26 12:22:34 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2019-02-26 12:22:34 +0000 |
commit | c4414768af5e2213b1ad2b16bc8e1b8062fd1e49 (patch) | |
tree | 1d9e6384ee790d98cf2724a5eb6ceb7e5e46ccab /synapse/handlers | |
parent | Correct indent (diff) | |
download | synapse-c4414768af5e2213b1ad2b16bc8e1b8062fd1e49.tar.xz |
Cleaner chunk logic
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/room_list.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/synapse/handlers/room_list.py b/synapse/handlers/room_list.py index 0ce274e9ae..c02fedcfe4 100644 --- a/synapse/handlers/room_list.py +++ b/synapse/handlers/room_list.py @@ -330,11 +330,10 @@ class RoomListHandler(BaseHandler): if not result: return - if from_federation: - if "m.federate" in result and not result["m.federate"]: - # This is a room that other servers cannot join. Do not show them - # this room. - return + if from_federation and not result.get("m.federate", True): + # This is a room that other servers cannot join. Do not show them + # this room. + return if _matches_room_entry(result, search_filter): chunk.append(result) |