Skip to content

Commit

Permalink
not re-create but reassign
Browse files Browse the repository at this point in the history
  • Loading branch information
KevLehman committed Oct 7, 2024
1 parent f4f3436 commit 919a82d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/meteor/app/e2e/client/rocketchat.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,14 @@ class E2E extends Emitter {

// When there's a key ID mismatch, create a new instance
// So we always use the latest keyID on room
if (!this.instancesByRoomId[rid] || this.instancesByRoomId[rid].keyID !== room.e2eKeyId) {
if (!this.instancesByRoomId[rid]) {
this.instancesByRoomId[rid] = new E2ERoom(Meteor.userId(), room);
}

if (this.instancesByRoomId[rid].keyID !== room.e2eKeyId) {
this.instancesByRoomId[rid].keyID = room.e2eKeyId;
}

return this.instancesByRoomId[rid];
}

Expand Down

0 comments on commit 919a82d

Please sign in to comment.