forked from mystiq/hydrogen-web
Remove timeline reader and only use roomState
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
8a976ef24b
commit
22fab3761a
1 changed files with 1 additions and 9 deletions
|
@ -28,7 +28,6 @@ import {EventEntry} from "./timeline/entries/EventEntry.js";
|
||||||
import {ObservedEventMap} from "./ObservedEventMap.js";
|
import {ObservedEventMap} from "./ObservedEventMap.js";
|
||||||
import {DecryptionSource} from "../e2ee/common.js";
|
import {DecryptionSource} from "../e2ee/common.js";
|
||||||
import {ensureLogItem} from "../../logging/utils.js";
|
import {ensureLogItem} from "../../logging/utils.js";
|
||||||
import {TimelineReader} from "./timeline/persistence/TimelineReader.js";
|
|
||||||
import {PowerLevels} from "./timeline/PowerLevels.js";
|
import {PowerLevels} from "./timeline/PowerLevels.js";
|
||||||
import {RetainedObservableValue} from "../../observable/ObservableValue.js";
|
import {RetainedObservableValue} from "../../observable/ObservableValue.js";
|
||||||
|
|
||||||
|
@ -392,14 +391,7 @@ export class BaseRoom extends EventEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadPowerLevels() {
|
async loadPowerLevels() {
|
||||||
const timelineReader = new TimelineReader({
|
const txn = await this._storage.readTxn([this._storage.storeNames.roomState]);
|
||||||
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 powerLevelsState = await txn.roomState.get(this._roomId, "m.room.power_levels", "");
|
const powerLevelsState = await txn.roomState.get(this._roomId, "m.room.power_levels", "");
|
||||||
if (powerLevelsState) {
|
if (powerLevelsState) {
|
||||||
return new PowerLevels({
|
return new PowerLevels({
|
||||||
|
|
Loading…
Reference in a new issue