mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
memberChanges is a map, not array
This commit is contained in:
parent
bbaf3a5605
commit
7b35a3c46c
@ -45,8 +45,11 @@ export class RoomEncryption {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async writeMemberChanges(memberChanges, txn) {
|
async writeMemberChanges(memberChanges, txn) {
|
||||||
if (memberChanges.some(m => m.hasLeft)) {
|
for (const m of memberChanges.values()) {
|
||||||
|
if (m.hasLeft) {
|
||||||
this._megolmEncryption.discardOutboundSession(this._room.id, txn);
|
this._megolmEncryption.discardOutboundSession(this._room.id, txn);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return await this._deviceTracker.writeMemberChanges(this._room, memberChanges, txn);
|
return await this._deviceTracker.writeMemberChanges(this._room, memberChanges, txn);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user