-
Notifications
You must be signed in to change notification settings - Fork 290
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
runfix: Correctly check if user has mls device before performing mls operations #17344
Conversation
@@ -443,7 +443,7 @@ export class App { | |||
// We load all the users the self user is connected with | |||
await userRepository.loadUsers(selfUser, connections, conversations, teamMembers); | |||
|
|||
if (supportsMLS()) { | |||
if (this.core.hasMLSDevice) { |
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.
if we have a MLS device it means that:
- the env supportsMLS (previous check)
- the team has MLS enabled
- the user has a valid mls device
(it a more exhaustive check than the previous supportsMLS
check)
// We need to check if the core service is available and if the e2eIdentity is available | ||
if (!this.core.service?.mls || !this.core.service?.e2eIdentity) { | ||
if (!this.core.hasMLSDevice || !this.core.service?.e2eIdentity) { |
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.
is this correct? If so, it doesn't match the code comment anymore right?
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.
indeed the comment needs updating, good catch :)
The fix is needed though (we should never check if mls is enabled by checking that the service is there, anymore)
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.
gotcha, I guess we're just not spying on that hasMLSDevice
in the unit test then
@@ -472,7 +472,7 @@ export class App { | |||
|
|||
await conversationRepository.init1To1Conversations(connections, conversations); | |||
|
|||
if (supportsMLS()) { | |||
if (this.core.hasMLSDevice) { |
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.
this one is the fix to automation correct?
Seems like the change in MLSConversationVerificationStateHandler
isn't necessarry? (that's the one breaking unit tests)
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.
exactly, I'm working on the fix right now :)
Quality Gate passedIssues Measures |
Description
see https://github.com/wireapp/wire-web-packages/pull/6185/files
Checklist