This differential implements a function that encrypts parts of iOS notification payload that are important to user's privacy
- Pull cookie of currently logged in user from MariaDB.
- Call this function in the keyserver code where iOS notification is constructed with hardcoded cookie id.
- Send notification to the physical iOS device. Log content of send notification and ensure relevant fields are encrypted.
I can't tell where these functions will be used, so it's a little harder to review
|1 ↗||(On Diff #26469)|
|38 ↗||(On Diff #26469)|
Can we save space and set this to 1?
|42 ↗||(On Diff #26469)|
We can remove the async keyword here
|46–48 ↗||(On Diff #26469)|
We can use a shorthand
|52 ↗||(On Diff #26469)|
Does encryptIOSNotification need to be exported?
- Validate every notification field before encryption attempt
- Encrypt more fields in notification payload
One request inline; please address before landing, or feel free to re-request review if you disagree or if I'm missing something
|41 ↗||(On Diff #26554)|
Can we construct a new Notification rather than mutating the existing one?
I should have been more specific
|12 ↗||(On Diff #26611)|
Rather than cloning the existing notification, can you create a new empty one, and fill in its fields as necessary?
Return apn.Notifications object in case of encryption failure. Previous apprhac used '...' syntax, and it failed further since the returned object didn't have 'length()' method.
|12 ↗||(On Diff #26651)|
Let's construct a new apn.Notification instead of cloning the one we're passed in