Page MenuHomePhabricator

Initialize notifications olm account in CommCoreModule and expose notifications public keys to JS
ClosedPublic

Authored by marcin on Feb 20 2023, 6:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 1:23 PM
Unknown Object (File)
Mon, Nov 4, 8:59 AM
Unknown Object (File)
Mon, Nov 4, 8:58 AM
Unknown Object (File)
Mon, Nov 4, 8:58 AM
Unknown Object (File)
Mon, Nov 4, 8:58 AM
Unknown Object (File)
Mon, Nov 4, 8:57 AM
Unknown Object (File)
Mon, Nov 4, 8:56 AM
Unknown Object (File)
Mon, Nov 4, 8:55 AM
Subscribers

Details

Summary

This differential uses NotificationsCryptoModule API to idempotently create notifications olm account and to expose notifications public keys in JS via JSI.

Test Plan

Modify one place in JS native code where we call getUserPublicKeys to log notifications public keys to the console. Example of such place is log-in panel. Launch the app and examine console.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

marcin retitled this revision from Initialize noptifications olm account in CommCoreModule and expose notifications public keys to JS to Initialize notifications olm account in CommCoreModule and expose notifications public keys to JS.
marcin added 2 blocking reviewer(s): kamil, atul.
marcin published this revision for review.Feb 20 2023, 6:37 AM
native/schema/CommCoreModuleSchema.js
28–31 ↗(On Diff #22873)

Should we update this to have a nested structure like in my Linear comment? I'm not sure it's strictly necessary if this is a client-only type, but it might be good to be consistent

Create nested notifications keys structure like on web.

native/schema/CommCoreModuleSchema.js
27

I think @atul defined this type somewhere else as well, after we land both of your diffs we should dedup and move to lib. Can you create a task and link it here before landing?

This revision is now accepted and ready to land.Feb 27 2023, 7:24 AM
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
837 ↗(On Diff #23325)

I believe this call is causing a JNI error, see ENG-2787

We should perhaps avoid calling this from the crypto thread?

native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
837 ↗(On Diff #23325)

Ignore, this was incorrect