pusher / push-notifications-node

Pusher Beams Node.js Server SDK
https://pusher.com/beams
MIT License
20 stars 23 forks source link

Attachments #40

Closed BrittoThomas closed 4 years ago

BrittoThomas commented 5 years ago

Hi, I am trying to send an image link with payload. My code like this

function senfPushNotificatonToPusher(title, message, ) {
  beamsClient.publish(['JobCategory'],
    {
      apns: {
        data :{
          imageurl: url
        },
        aps:{
          alert:{
              title:title,
              body: message
            },
          badge:1,
          sound:"default",
          category:"Category",
          "mutable-content":1
        }
      }
    }
  ).then((publishResponse) => {
    console.log('Just published:', publishResponse);
  }).catch((error) => {
    console.log('Error:', error);
  });

But at the device ent, I am not able to retrieve the url

[AnyHashable("data"): {
    pusher =     {
        publishId = "pubid-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx;
        userShouldIgnore = 1;
    };
}, AnyHashable("aps"): {
    alert =     {
        body = "Debug Console";
        title = "Test Notification";
    };
    "content-available" = 1;
}]
jonathanlloyd commented 4 years ago

Hi!

Sorry for taking so long to reply to this - if you're still having issues drop us a message at support@pusher.com and we'll help you debug further.

Thanks!