From 0c7671dddb6f4e731e5e8bc6897c550cc0c084a1 Mon Sep 17 00:00:00 2001 From: Sam Wedgwood Date: Tue, 18 Jul 2023 15:43:05 +0100 Subject: [PATCH] fix bug where limit = -1 returning nothing - internal room hierarchy function should treat -1 as no limit, it wasnt --- roomserver/internal/query/query_room_hierarchy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roomserver/internal/query/query_room_hierarchy.go b/roomserver/internal/query/query_room_hierarchy.go index a59c834d6..b05db7429 100644 --- a/roomserver/internal/query/query_room_hierarchy.go +++ b/roomserver/internal/query/query_room_hierarchy.go @@ -52,7 +52,7 @@ func (querier *Queryer) QueryNextRoomHierarchyPage(ctx context.Context, walker r // Depth first -> stack data structure for len(unvisited) > 0 { - if len(discoveredRooms) >= limit { + if len(discoveredRooms) >= limit && limit != -1 { break }