From 19f07aa6c2d1bfd996ac7a9176e4029191b94fa0 Mon Sep 17 00:00:00 2001 From: Tyler Hall Date: Thu, 24 Aug 2017 15:13:40 -0400 Subject: [PATCH] Update PAYLOAD.md --- docs/PAYLOAD.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/PAYLOAD.md b/docs/PAYLOAD.md index 431b5a4e1..56d064405 100644 --- a/docs/PAYLOAD.md +++ b/docs/PAYLOAD.md @@ -1473,7 +1473,7 @@ Then send the follow JSON from APNS: If you want the default sound to play upon receipt of push use this payload: -``` +```javascript { "aps": { "alert": "Test sound", @@ -1492,11 +1492,11 @@ For instance the following JSON: ```javascript { - "aps": { - "alert": "Test background push", - "content-available": 1 - }, - "notId": 1 // unique ID you generate + "aps": { + "alert": "Test background push", + "content-available": 1 + }, + "notId": 1 // unique ID you generate } ``` @@ -1508,12 +1508,12 @@ However if you want your `on('notification')` event handler called but no notifi ```javascript { - "aps": { - "data": "Test silent background push", - "moredata": "Do more stuff", - "content-available": 1 - }, - "notId": 2 // unique ID you generate + "aps": { + "data": "Test silent background push", + "moredata": "Do more stuff", + "content-available": 1 + }, + "notId": 2 // unique ID you generate } ``` @@ -1542,8 +1542,8 @@ push.on('notification', function(data) { push.finish(function() { console.log("processing of push data is finished"); }, function() { - console.log("something went wrong with push.finish for ID = " + data.additionalData.notId) - }, data.additionalData.notId); + console.log("something went wrong with push.finish for ID = " + data.additionalData.notId) + }, data.additionalData.notId); }); ```