track room before listing user ids when sharing key

This commit is contained in:
Bruno Windels 2022-07-27 12:06:55 +02:00
parent f18520a2fe
commit 0df66b5aea
1 changed files with 2 additions and 0 deletions

View File

@ -323,6 +323,8 @@ export class RoomEncryption {
}
async _shareNewRoomKey(roomKeyMessage, hsApi, log) {
this._historyVisibility = await this._loadHistoryVisibilityIfNeeded(this._historyVisibility);
await this._deviceTracker.trackRoom(this._room, this._historyVisibility, log);
const devices = await this._deviceTracker.devicesForTrackedRoom(this._room.id, hsApi, log);
const userIds = Array.from(devices.reduce((set, device) => set.add(device.userId), new Set()));