try sending out pending room keys after first sync
This commit is contained in:
parent
31d4b6f75d
commit
1aa044667c
2 changed files with 11 additions and 2 deletions
|
@ -217,7 +217,7 @@ export class Session {
|
|||
|
||||
this._sendScheduler.start();
|
||||
for (const [, room] of this._rooms) {
|
||||
room.resumeSending();
|
||||
room.start();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -217,7 +217,16 @@ export class Room extends EventEmitter {
|
|||
}
|
||||
|
||||
/** @package */
|
||||
resumeSending() {
|
||||
async start() {
|
||||
if (this._roomEncryption) {
|
||||
try {
|
||||
// if we got interrupted last time sending keys to newly joined members
|
||||
await this._roomEncryption.shareRoomKeyToPendingMembers(this._hsApi);
|
||||
} catch (err) {
|
||||
// we should not throw here
|
||||
console.error(`could not send out pending room keys for room ${this.id}`, err.stack);
|
||||
}
|
||||
}
|
||||
this._sendQueue.resumeSending();
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue