fix typos preventing to load the history visibility

This commit is contained in:
Bruno Windels 2022-07-28 11:44:50 +02:00
parent 0df66b5aea
commit 319ec37864

View file

@ -136,9 +136,9 @@ export class RoomEncryption {
if (!txn) {
txn = await this._storage.readTxn([this._storage.storeNames.roomState]);
}
const visibilityEntry = await txn.roomState.get(this.id, ROOM_HISTORY_VISIBILITY_TYPE, "");
const visibilityEntry = await txn.roomState.get(this._room.id, ROOM_HISTORY_VISIBILITY_TYPE, "");
if (visibilityEntry) {
return event?.content?.history_visibility;
return visibilityEntry.event?.content?.history_visibility;
}
}
return historyVisibility;