Skip to content

Commit

Permalink
fixing false children bug, which will potential not work with federation
Browse files Browse the repository at this point in the history
  • Loading branch information
robertschnuell committed Aug 25, 2023
1 parent fea2754 commit 119cf7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/item.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
})

Expand Down

0 comments on commit 119cf7e

Please sign in to comment.