evanshortiss / sns-mobile

Push notifications to Android, Kindle, and iOS devices easily using this module.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can not send message as a object

deepaksisodiya opened this issue · comments

I am using sendMessage to send notification, but it is working with strings only, when i try to send object it does not work.

// working code
app.sendMessage(arn, 'string message', function (err, messageId) {
console.log(messageId);
});

// not working
app.sendMessage(arn, {message : 'object message'}, function (err, messageId) {
console.log(messageId);
});

I need to do JSON.stringify(object)