Skip to content

Commit

Permalink
Import new node library
Browse files Browse the repository at this point in the history
Set interruption level
  • Loading branch information
gestrich committed Jul 1, 2023
1 parent 20675cc commit d500fd8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/server/loop.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//'use strict';

const apn = require('apn');
const apn = require('@parse/node-apn');

function init (env, ctx) {

Expand Down Expand Up @@ -128,6 +128,7 @@ function init (env, ctx) {
notification.topic = loopSettings.bundleIdentifier;
notification.contentAvailable = 1;
notification.payload = payload;
notification.interruptionLevel = "time-sensitive"

provider.send(notification, [loopSettings.deviceToken]).then( (response) => {
if (response.sent && response.sent.length > 0) {
Expand Down

0 comments on commit d500fd8

Please sign in to comment.