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, Apr 9, 7:26 AM
Unknown Object (File)
Thu, Mar 28, 5:25 PM
Unknown Object (File)
Thu, Mar 28, 5:25 PM
Unknown Object (File)
Thu, Mar 28, 5:25 PM
Unknown Object (File)
Thu, Mar 28, 5:25 PM
Unknown Object (File)
Thu, Mar 28, 5:25 PM
Unknown Object (File)
Thu, Mar 28, 5:25 PM
Unknown Object (File)
Thu, Mar 28, 5:24 PM
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
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #23055)

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

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

Ignore, this was incorrect