mirror of
https://gitlab.silvrtree.co.uk/martind2000/SODashServer.git
synced 2025-02-14 07:59:16 +00:00
Apple Push notifications. Trying something else. again
This commit is contained in:
parent
b66a9f3650
commit
f1ce8a1171
18
app.js
18
app.js
@ -265,20 +265,12 @@ app.post('/api/v1/register/ios', function(req, res) {
|
|||||||
|
|
||||||
apnTimer = setInterval(function() {
|
apnTimer = setInterval(function() {
|
||||||
|
|
||||||
/* Var myDevice = new apn.Device(registrationId[0]);
|
logger.info('Sending the same notification each of the devices with one call to pushNotification.');
|
||||||
|
var note = new apn.notification();
|
||||||
var note = new apn.Notification();
|
note.setAlertText('Hello, from node-apn!');
|
||||||
|
note.badge = 1;
|
||||||
note.expiry = Math.floor(Date.now() / 1000) + 3600; // Expires 1 hour from now.
|
|
||||||
note.badge = 3;
|
|
||||||
note.sound = "ping.aiff";
|
|
||||||
note.alert = "\uD83D\uDCE7 \u2709 You have a new message";
|
|
||||||
note.payload = {'messageFrom': 'Caroline'};
|
|
||||||
|
|
||||||
apnConnection.pushNotification(note, myDevice);*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
apnService.pushNotification(note, iosTokens);
|
||||||
|
|
||||||
}, 30000);
|
}, 30000);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user