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

Notifications with Crypto V2 #1644

Merged
merged 1 commit into from
Nov 24, 2022
Merged

Notifications with Crypto V2 #1644

merged 1 commit into from
Nov 24, 2022

Conversation

Anderas
Copy link
Contributor

@Anderas Anderas commented Nov 23, 2022

Extract OlmDevice and MXBackgroundCryptoStore out of MXBackgroundSyncService and behind a new MXBackgroundCrypto protocol. This protocol is similar to MXCrypto but with much smaller set of functionality, basically just the ability to recieve new room keys and decrypt events. All code moved out of MXBackgroundSyncService into MXLegacyBackgroundCrypto is unchanged, apart from logs.

Furthermore add MXBackgroundCryptoV2 which uses rust-based CryptoMachine under the hood and is also able to recieve keys and decrypt messages. One difference compared to the legacy crypto is that crypto v2 will only use one shared store between foreground and background processes meaning there is no need to synchronize these two stores.

@Anderas Anderas requested review from a team and ismailgulek and removed request for a team November 23, 2022 12:56

import Foundation

class MXLegacyBackgroundCrypto: MXBackgroundCrypto {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All code in this class is moved unchaged from MXBackgroundSyncService

@codecov
Copy link

codecov bot commented Nov 23, 2022

Codecov Report

Base: 16.03% // Head: 16.01% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (3c81cbc) compared to base (5131019).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1644      +/-   ##
===========================================
- Coverage    16.03%   16.01%   -0.02%     
===========================================
  Files          583      585       +2     
  Lines        92561    92644      +83     
  Branches     39042    39072      +30     
===========================================
  Hits         14840    14840              
- Misses       77234    77317      +83     
  Partials       487      487              
Impacted Files Coverage Δ
...ixSDK/Background/Crypto/MXBackgroundCryptoV2.swift 0.00% <0.00%> (ø)
...K/Background/Crypto/MXLegacyBackgroundCrypto.swift 0.00% <0.00%> (ø)
MatrixSDK/Background/MXBackgroundSyncService.swift 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@ismailgulek ismailgulek left a comment

Choose a reason for hiding this comment

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

LGTM 👌

@Anderas Anderas merged commit 49b44e1 into develop Nov 24, 2022
@Anderas Anderas deleted the andy/crypto_notifications branch November 24, 2022 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants