Fix bug in room hierarchy

Signed-off-by: ajbura <ajbura@gmail.com>
This commit is contained in:
ajbura 2022-02-16 19:50:11 +05:30
parent 8d3f0a9f4d
commit 76cb52878c

View file

@ -28,9 +28,12 @@ class RoomsHierarchy {
let roomHierarchy = this.getHierarchy(roomId);
if (!roomHierarchy) {
const room = this.matrixClient.getRoom(roomId);
if (!room) return null;
roomHierarchy = new RoomHierarchy(room, limit, this._maxDepth, this._suggestedOnly);
roomHierarchy = new RoomHierarchy(
{ roomId, client: this.matrixClient },
limit,
this._maxDepth,
this._suggestedOnly,
);
this.roomIdToHierarchy.set(roomId, roomHierarchy);
}