This differential introduces encryptedNotifUtilsAPI on the client platforms to smoothly use function from lib/push. Encryption implementation is mocked and will be replaced once we tackle notif session initialization.
Details
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
native/push/encrypted-notif-utils-api.js | ||
---|---|---|
29 ↗ | (On Diff #41696) | Current code for uploading data to blob service is tightly coupled to the ksyerver uploads table and expo-file-system library which I don't think it the case for e2e notifs so this code would require some refactoring to support e2e notifs case. We could move the current code that is on the keyserver to lib but this code uses fetch library. However @bartek told me that it might not work well on native. Therefore given the fact that we haven't even started notif session intialization between clients (which is far more important) I am willing to cut a scope here. Returning error message from this funciton won't crash notif generation and delivery. It will just be delivered without message infos if it exceeds push service limit. |
native/push/encrypted-notif-utils-api.js | ||
---|---|---|
29 ↗ | (On Diff #41696) |
|
native/push/encrypted-notif-utils-api.js | ||
---|---|---|
29 ↗ | (On Diff #41696) |
I only had quick conversation about this with @bartek . I was informed that fetch doesn't work well with large amounts of data and that is why it is not used to upload multimedia to blob on native. On the other hand even though large notif payloads exceed APNs/FCM limits they are likely significantly smaller than multimedia messages. Therefore we are likely to succeed with with fetch. |
- Return that size limit was violated if notificationPayloadValidator returns false
- Rebase before landing
native/push/encrypted-notif-utils-api.js | ||
---|---|---|
13 | What does it mean? |
native/push/encrypted-notif-utils-api.js | ||
---|---|---|
13 | This is the type of olm encrypted message. 1 is MESSSAGE_TYPE_MESSAGE while 0 i` MESSAGE_TYPE_PREKEY`. See the following type from olm_vx.x.x.js: declare export type EncryptResult = { +type: 0 | 1, // 0: PreKey, 1: Message +body: string, }; |