From 48ac27e5504d4b58fecf189ae29c5db0406a8830 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 19 Mar 2021 18:25:45 +0000 Subject: [PATCH] fix duplicated results --- synapse/handlers/space_summary.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/synapse/handlers/space_summary.py b/synapse/handlers/space_summary.py index 630a3c149d37..ff1ae4d00e70 100644 --- a/synapse/handlers/space_summary.py +++ b/synapse/handlers/space_summary.py @@ -115,6 +115,9 @@ async def get_space_summary( exclude_rooms=processed_rooms, ) + # any rooms returned don't need visiting again + processed_rooms.update(room.get("room_id") for room in rooms) + rooms_result.extend(rooms) events_result.extend(events)