Page MenuHomePhabricator

Extend CommIOSNotification module with method to send an event to JS to trigger message infos persistence
ClosedPublic

Authored by marcin on Apr 3 2023, 3:54 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 9:23 PM
Unknown Object (File)
Fri, Nov 8, 9:23 PM
Unknown Object (File)
Fri, Nov 8, 9:23 PM
Unknown Object (File)
Fri, Nov 8, 9:19 PM
Unknown Object (File)
Fri, Nov 8, 3:31 PM
Unknown Object (File)
Fri, Nov 8, 2:00 PM
Unknown Object (File)
Wed, Nov 6, 3:27 AM
Unknown Object (File)
Tue, Nov 5, 4:47 AM
Subscribers

Details

Summary

This differential adds method to CommIOSNotifications module that can send event to JS to persist in redux message infos that wasreceived by Notification Service Extension while the app was in the background.

Test Plan

Build the app. Call this method in didReceiveNotification callback in AppDelegate with dummy message infos. Subscribe in JS to log message infos to console.

Diff Detail

Repository
rCOMM Comm
Branch
marcin/eng-3363
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

marcin requested review of this revision.Apr 3 2023, 4:10 AM
tomek added inline comments.
native/ios/Comm/CommIOSNotifications/CommIOSNotifications.mm
271

This string is used twice - maybe we can extract it to a constant?

This revision is now accepted and ready to land.Apr 7 2023, 2:23 AM
native/ios/Comm/CommIOSNotifications/CommIOSNotifications.mm
271

To be consistent we would have to do so for every string that represents a certain event we send to JS (each string in supportedEvents method is used twice in the same manner). This will be done along with https://linear.app/comm/issue/ENG-2842/export-javascript-event-names-as-constants-in-native-modules. For now I would leave it as it is in order to be consistent with the rest of the code.