From 22fab3761ad063a01bfa12d55b4ba290b0a5a2d7 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Wed, 14 Jul 2021 13:52:31 +0530 Subject: [PATCH] Remove timeline reader and only use roomState Signed-off-by: RMidhunSuresh --- src/matrix/room/BaseRoom.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/matrix/room/BaseRoom.js b/src/matrix/room/BaseRoom.js index ddeb063b..832406e1 100644 --- a/src/matrix/room/BaseRoom.js +++ b/src/matrix/room/BaseRoom.js @@ -28,7 +28,6 @@ import {EventEntry} from "./timeline/entries/EventEntry.js"; import {ObservedEventMap} from "./ObservedEventMap.js"; import {DecryptionSource} from "../e2ee/common.js"; import {ensureLogItem} from "../../logging/utils.js"; -import {TimelineReader} from "./timeline/persistence/TimelineReader.js"; import {PowerLevels} from "./timeline/PowerLevels.js"; import {RetainedObservableValue} from "../../observable/ObservableValue.js"; @@ -392,14 +391,7 @@ export class BaseRoom extends EventEmitter { } async loadPowerLevels() { - const timelineReader = new TimelineReader({ - roomId: this._roomId, - storage: this._storage, - fragmentIdComparer: this._fragmentIdComparer - }); - const txn = await this._storage.readTxn( - timelineReader.readTxnStores.concat(this._storage.storeNames.roomMembers, this._storage.storeNames.roomState) - ); + const txn = await this._storage.readTxn([this._storage.storeNames.roomState]); const powerLevelsState = await txn.roomState.get(this._roomId, "m.room.power_levels", ""); if (powerLevelsState) { return new PowerLevels({