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

Unify verification event processing in Crypto V2 #1717

Merged
merged 1 commit into from
Feb 14, 2023
Merged

Conversation

Anderas
Copy link
Contributor

@Anderas Anderas commented Feb 13, 2023

Previously the CryptoSDK would automatically handle encrypted verification events in rooms as soon as they are decrypted via decryptRoomEvent methods. Whilst this sounds convenient, there are a number of issues with this approach:

  • we still need to manually pass in unencrypted verification events, not otherwise known to the crypto machine
  • upon decrypting a verification event, we may have some new requests to sent out out of a sync loop

An improved approach is to prevent the machine from automatically processing verification events via a parameter, and then reuse existing event observers to pass in both encrypted and unencrypted verification events.

@Anderas Anderas requested review from a team and stefanceriu and removed request for a team February 13, 2023 11:04
@Anderas Anderas changed the title Unify verification event processing Unify verification event processing in Crypto V2 Feb 13, 2023
Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Base: 17.52% // Head: 17.62% // Increases project coverage by +0.09% 🎉

Coverage data is based on head (337ae44) compared to base (7d59096).
Patch coverage: 65.51% of modified lines in pull request are covered.

❗ Current head 337ae44 differs from pull request most recent head 3958b55. Consider uploading reports for the commit 3958b55 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1717      +/-   ##
===========================================
+ Coverage    17.52%   17.62%   +0.09%     
===========================================
  Files          612      612              
  Lines        95983    96117     +134     
  Branches     40286    40333      +47     
===========================================
+ Hits         16823    16939     +116     
- Misses       78649    78668      +19     
+ Partials       511      510       -1     
Impacted Files Coverage Δ
...o/Algorithms/RoomEvent/MXRoomEventDecryption.swift 53.77% <0.00%> (-1.57%) ⬇️
...ypto/Verification/MXKeyVerificationManagerV2.swift 20.73% <0.00%> (-0.56%) ⬇️
...s/Crypto/CryptoMachine/MXCryptoProtocolStubs.swift 42.27% <0.00%> (ø)
...ts/Crypto/Migration/MXCryptoMigrationV2Tests.swift 0.00% <0.00%> (ø)
...trixSDK/Crypto/CryptoMachine/MXCryptoMachine.swift 13.62% <60.71%> (+4.00%) ⬆️
...rypto/CryptoMachine/MXCryptoMachineUnitTests.swift 88.40% <95.12%> (+9.09%) ⬆️
MatrixSDK/Background/MXBackgroundSyncService.swift 0.00% <0.00%> (ø)
MatrixSDK/Contrib/Swift/MXResponse.swift 43.58% <0.00%> (+0.73%) ⬆️
MatrixSDK/JSONModels/MXJSONModel.m 61.06% <0.00%> (+8.84%) ⬆️

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.

@Anderas Anderas force-pushed the andy/crypto_fixes branch 2 times, most recently from 8092495 to 337ae44 Compare February 13, 2023 14:29
@Anderas Anderas merged commit a58ad16 into develop Feb 14, 2023
@Anderas Anderas deleted the andy/crypto_fixes branch February 14, 2023 08:19
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.

2 participants