Skip to content
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

fix: Correctly detect if current device is MLS capable #6185

Merged
merged 1 commit into from
Apr 30, 2024
Merged

Conversation

atomrc
Copy link
Contributor

@atomrc atomrc commented Apr 30, 2024

This will allow the consumer to know if an MLS device has been setup or not.
This is to prevent trying to do MLS operations if the devices has not been initialized

@@ -620,7 +627,7 @@ export class Account extends TypedEventEmitter<Events> {
});

const handleMissedNotifications = async (notificationId: string) => {
if (this.service?.mls) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now, the fact that the mls service is instantiated doesn't necesarily means the mls device is ready to use. We need to add some more checks before doing any kind of mls operation.

This is due to the fact that we do not yet have the MLS config when the core is instantiated. So we cannot decide whether the MLS service should be instantiated at build time. Thus we need some extra checks

@atomrc atomrc merged commit d44c18f into main Apr 30, 2024
7 checks passed
@atomrc atomrc deleted the fix/mls-enabled branch April 30, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants