-
-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle MatrixRTC encryption keys arriving out of order #4345
Conversation
f7ec088
to
885c5a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
if (!this.encryptionKeys.has(participantId)) { | ||
this.encryptionKeys.set(participantId, []); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There must be a tidy way to avoid all of the timestamp / keysEqual
checks for when it's known from the start that there's no existing key for the participant...but since that was the case even before this PR, we can revisit this later.
Co-authored-by: Andrew Ferrazzutti <[email protected]>
This change ensures that if an older key is received after a newer one then it isn't allowed to overwrite the newer one. Resolves element-hq/element-call#2549
Checklist
public
/exported
symbols have accurate TSDoc documentation.