Implement notification types, creation and encryption for APNs notifications
Summary: This differential implements our own types for APNs notifications as well as notif construction and encryption.
Test Plan:
In order to test this code we need to hack the keyserver since in order to send APNs notif we need apn.Notification object anyway (it is required by node-apn lib). The steps are:
- Apply this patch: https://gist.github.com/marcinwasowicz/1af0a2958830fd9eb080e639779b1628. It makes the keyserver use our own types and new code to build the notification but before sending it creates custom apn.Notification object and overwrites its headers and compile methods to return data from our own notification.
- Test that APNs notifications, rescind and badge updates work for both iOS and macos
- Flow (unrelatedly).
Reviewers: kamil, tomek
Reviewed By: kamil
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D12429