[lib] implement sending APNs notifs using Tunnelbroker
Summary:
Client code to send notif.
Depends on D12616
Test Plan:
try { const notif: TunnelbrokerAPNsNotif = { type: 'APNsNotif', headers: JSON.stringify({ 'apns-topic': 'app.comm' }), clientMessageID: uuid.v4(), deviceID: '[my device ID]', payload: '{"aps":{"alert":{"title":"your_title_here","body":"your_body_here"},"mutable-content":1}}', }; await sendNotif(notif); } catch (e) { console.log(e); }
Testing this code multiple times with different TB configs and different headers.
Note: Not testing different payloads, code to create that is now being moved from keyserver so assuming it should work, Tunnelbroker does not modify notif itself. (cc. @marcin)
Reviewers: bartek, marcin
Reviewed By: bartek
Subscribers: ashoat, tomek, marcin
Differential Revision: https://phab.comm.dev/D12617