From 119cf7edba94db6fbeea08813686a825dfb9fc93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Schn=C3=BCll?= Date: Fri, 25 Aug 2023 16:07:39 +0200 Subject: [PATCH] fixing false children bug, which will potential not work with federation --- src/item.service.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/item.service.js b/src/item.service.js index d0fb1f7..41131bb 100644 --- a/src/item.service.js +++ b/src/item.service.js @@ -430,7 +430,10 @@ export class ItemService { _.forEach(potentialChildren, (child) => { if (_.find(child?.stateEvents, { type: 'dev.medienhaus.meta' })) { - children.push(child.room_id) + // Check if the potentialChild is not a outdated StateEvent and is als part of the 'children_state'. This might not work with federation, need a closer check then. + if (_.find(rawSpaces[spaceId]?.children_state, { state_key: child.room_id })) { + children.push(child.room_id) + } } })