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

Emit InitialSyncDone notification to allow client to perform auto-a… #1832

Conversation

NicolasBuquet
Copy link
Contributor

@NicolasBuquet NicolasBuquet commented Nov 20, 2023

Emit InitialSyncDone notification to allow client to perform auto-activation of cross-signing as in Android client

Pull Request Checklist

…ctivation of cross-signing as in Android client

Signed-off-by: Nicolas Buquet <[email protected]>
Copy link

codecov bot commented Nov 20, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (626e03f) 35.63% compared to head (159c93d) 35.61%.
Report is 16 commits behind head on develop.

Files Patch % Lines
MatrixSDK/Data/MXRoom.m 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1832      +/-   ##
===========================================
- Coverage    35.63%   35.61%   -0.03%     
===========================================
  Files          617      617              
  Lines        96959    96997      +38     
  Branches     41454    41477      +23     
===========================================
- Hits         34552    34543       -9     
- Misses       61487    61533      +46     
- Partials       920      921       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Nicolas Buquet <[email protected]>
@NicolasBuquet
Copy link
Contributor Author

@pixlwave Hello Doug.

Can you have a look at this PR. We need it on Tchap.

@pixlwave
Copy link
Member

pixlwave commented Nov 27, 2023

Hi Nicolas, I'm a bit confused about the approach of this change. As I understand it, Tchap is a fork of Element iOS, so how come you can't use SessionVerificationListener which does the right thing automatically?

@NicolasBuquet
Copy link
Contributor Author

Thank you for your attention @pixlwave.

I was not aware of SessionVerificationListener.

I will have a look at it and check if :

  • I can hook in it at the right moment and in the right state
  • I can auto-activate cross-signing without user interaction (the famous grace period) from here

Thank you.

@NicolasBuquet
Copy link
Contributor Author

NicolasBuquet commented Nov 27, 2023

@pixlwave

Update to the previous comment.

AuthenticationCoordinator is used by OnboardingCoordinator in Element.

But OnboardingCoordinator is not used in the custom Onboarding process in Tchap.

So, the simple method is to mimic what is done on the Android side, listen to an initialSyncDone notification.

The best plan would be to use AuthenticationCoordinator in Tchap custom onboarding process, but that's not the short term plan.

@pixlwave
Copy link
Member

Can't you adopt the SessionVerificationListener in that onboarding process? It handles everything for you, auto-activating, the lot. Alternatively how come you can't listen for the first kMXSessionDidSyncNotification notification? I'm not sure I see the need to add a new one here for a single client's specific needs.

@NicolasBuquet
Copy link
Contributor Author

SessionVerificationListener is not very usable (recent Swift not easy to interface with legacy objC).

I manage to handle cross-signing auto-activation using kMXSessionDidSyncNotification notification.

Thank you for your insight in absence of documentation :-)

No more need to emit a new notification Matrix side 👍

@NicolasBuquet NicolasBuquet deleted the initial-sync-notification branch December 4, 2023 08:58
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