mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-16 11:23:49 +01:00
Clean up room chunk logic
This commit is contained in:
parent
6728bf3940
commit
40c2271680
1 changed files with 8 additions and 6 deletions
|
@ -327,13 +327,15 @@ class RoomListHandler(BaseHandler):
|
||||||
return
|
return
|
||||||
|
|
||||||
result = yield self.generate_room_entry(room_id, num_joined_users)
|
result = yield self.generate_room_entry(room_id, num_joined_users)
|
||||||
|
if not result:
|
||||||
|
return
|
||||||
|
|
||||||
if from_federation:
|
if from_federation and result["m.federate"] is False:
|
||||||
if not result or result["m.federate"] is False:
|
# This is a room that other servers cannot join. Do not show them
|
||||||
# This is a non-federating room and the config has chosen not
|
# this room.
|
||||||
# to show these rooms to other servers
|
return
|
||||||
return
|
|
||||||
elif result and _matches_room_entry(result, search_filter):
|
if _matches_room_entry(result, search_filter):
|
||||||
chunk.append(result)
|
chunk.append(result)
|
||||||
|
|
||||||
@cachedInlineCallbacks(num_args=2, cache_context=True)
|
@cachedInlineCallbacks(num_args=2, cache_context=True)
|
||||||
|
|
Loading…
Reference in a new issue