HomePhabricator
Diffusion Comm 7d1745dc1f34

[lib] implement sending APNs notifs using Tunnelbroker

Description

[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

Details

Provenance
kamilAuthored on Fri, Jun 28, 5:50 AM
Reviewer
bartek
Differential Revision
D12617: [lib] implement sending APNs notifs using Tunnelbroker
Parents
rCOMMae75b01335c7: [Tunnelbroker] implement sending APNs notifs by client
Branches
Unknown
Tags
Unknown