Page MenuHomePhabricator

Introduce notifications crypto module to CommCoreModule
ClosedPublic

Authored by marcin on Mar 4 2024, 4:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 12 2024, 6:22 AM
Unknown Object (File)
Apr 10 2024, 12:28 PM
Unknown Object (File)
Apr 8 2024, 12:03 PM
Unknown Object (File)
Apr 7 2024, 4:35 AM
Unknown Object (File)
Apr 4 2024, 7:01 PM
Unknown Object (File)
Apr 4 2024, 7:01 PM
Unknown Object (File)
Mar 17 2024, 1:41 AM
Unknown Object (File)
Mar 16 2024, 10:00 AM
Subscribers

Details

Summary

This differential modifies CommCoreModule to work with notifications account that is persisted in SQLite. At the point of this diff notifications crypto
account exists in two places: in SQLite and in notifs storage. This isn't a mistake since only the one in SQLite will be used for cryptographic purposes since notifs
specific code only works with session. Next diff will remove notifs account from notifs storage.

Test Plan
  1. Uninstall comm app from iOS/Android device.
  2. Apply this patch and build the app: https://gist.github.com/marcinwasowicz/47964be1bd6aeaabc5504b3fa440f340
  3. Tap each button that the patch introduces. Ensure that keys are logged to console.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

marcin requested review of this revision.Mar 4 2024, 4:59 AM
kamil added inline comments.
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
351 ↗(On Diff #37792)
395 ↗(On Diff #37792)
399 ↗(On Diff #37792)
662 ↗(On Diff #37792)
694 ↗(On Diff #37792)

we return in line above sp we can make only if condition to make it more readable

695–696 ↗(On Diff #37792)

are you sure this is the right condition?

native/cpp/CommonCpp/NativeModules/CommCoreModule.h
30 ↗(On Diff #37792)

I think we should now rename it to contentCryptoModule

agree with @kamil 's suggestions, but lgtm otherwise

This revision is now accepted and ready to land.Mar 5 2024, 12:47 PM
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
454–462 ↗(On Diff #37792)

Isn't this done in the constructor of CryptoModule?

Rebase to account for changes from parent differential