await operation, otherwise it keeps running during next sync

This commit is contained in:
Bruno Windels 2022-11-03 16:37:20 +01:00
parent 25c8f1cf04
commit 2582600249

View File

@ -303,7 +303,7 @@ export class Room extends BaseRoom {
const shouldFetchUnverifiedSenders = this._isTimelineOpen && decryption?.hasUnverifiedSenders;
// only log rooms where we actually do something
if (shouldFlushKeys || shouldFetchUnverifiedSenders) {
log.wrap({l: "room", id: this.id}, async log => {
await log.wrap({l: "room", id: this.id}, async log => {
const promises = [];
if (shouldFlushKeys) {
promises.push(this._roomEncryption.flushPendingRoomKeyShares(this._hsApi, null, log));