This updates keyserver code so that it inserts its unencrypted id in notification payload.
Details
Build iOS/Android app. Ensure that notifications and unread count work correctly.
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
| keyserver/src/push/types.js | ||
|---|---|---|
| 50 | Didn't know this syntax was possible. To be honest, I'm a little skeptical that Flow will be able to understand it, and I suspect that it is breaking the types but not reporting it. Might be good to do some inspection via IDE or flow type-at-pos | |
This differential removes ashoatKeyserverID from native notifs code
There are only keyserver changes, was something not included?
| keyserver/src/push/rescind.js | ||
|---|---|---|
| 65 | Why was this removed? | |
Initially this diffs contained native changes. I restructured my stack so that they are not there anymore but forgot to update diff description.
| keyserver/src/push/rescind.js | ||
|---|---|---|
| 65 | Clearly my mistake - will fix it. | |
| keyserver/src/push/types.js | ||
|---|---|---|
| 50 | Inspection with IDE reveals the following structure: type AndroidNotificationRescind = {
+data: {
+keyserverID: string,
...(
{
+badge: string,
+encryptionFailed?: string,
+rescind: "true",
+rescindID: string,
+setUnreadStatus: "true",
+threadID: string
}
|
{+encryptedPayload: string})
}
}
= {
+data: (
{encryptedPayload: string, keyserverID: string}
|
{
badge: string,
encryptionFailed?: string,
keyserverID: string,
rescind: "true",
rescindID: string,
setUnreadStatus: "true",
threadID: string
})
}I guess then that flow follows A and (B or C) = (A and B) or (A and C). In other words it understands it as a union of types following the spread operator each of which was enriched with keyserverID. It is what we want here. | |