Page MenuHomePhabricator

Introduce notifications crypto module to CommCoreModule
ClosedPublic

Authored by marcin on Mar 4 2024, 4:44 AM.
Tags
None
Referenced Files
F3251964: D11232.id37792.diff
Fri, Nov 15, 6:01 PM
Unknown Object (File)
Fri, Nov 8, 11:18 AM
Unknown Object (File)
Wed, Nov 6, 3:43 PM
Unknown Object (File)
Fri, Nov 1, 6:38 AM
Unknown Object (File)
Fri, Nov 1, 6:38 AM
Unknown Object (File)
Fri, Nov 1, 6:13 AM
Unknown Object (File)
Oct 16 2024, 12:33 PM
Unknown Object (File)
Oct 15 2024, 3:03 PM
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
No Lint Coverage
Unit
No Test Coverage

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
395
399
662
694

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

695–696

are you sure this is the right condition?

native/cpp/CommonCpp/NativeModules/CommCoreModule.h
30

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

Isn't this done in the constructor of CryptoModule?

Rebase to account for changes from parent differential