forked from mystiq/hydrogen-web
memberChanges is a map, not array
This commit is contained in:
parent
bbaf3a5605
commit
7b35a3c46c
1 changed files with 5 additions and 2 deletions
|
@ -45,8 +45,11 @@ export class RoomEncryption {
|
|||
}
|
||||
|
||||
async writeMemberChanges(memberChanges, txn) {
|
||||
if (memberChanges.some(m => m.hasLeft)) {
|
||||
this._megolmEncryption.discardOutboundSession(this._room.id, txn);
|
||||
for (const m of memberChanges.values()) {
|
||||
if (m.hasLeft) {
|
||||
this._megolmEncryption.discardOutboundSession(this._room.id, txn);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return await this._deviceTracker.writeMemberChanges(this._room, memberChanges, txn);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue