appfeel / node-pushnotifications

Push notifications for GCM, APNS, MPNS, AMZ (automatic detection from device token)
MIT License
534 stars 126 forks source link

WNS sendRaw: Error: The payload parameter must be the notification payload string. #75

Closed nelsona closed 6 years ago

nelsona commented 6 years ago

When trying to send raw notifications using WNS the following error is returned: Error: The payload parameter must be the notification payload string.

This is happening because in the sendWNS.js file the data being set across to WNS is using Object.assign({}, _data) (line 49) before it is sent over, this is fine for all other windows notification type apart from raw which expects a string of data rather than an object.

alex-friedl commented 6 years ago

Hello @nelsona , I created https://github.com/appfeel/node-pushnotifications/pull/81 as a bugfix. Unfortunately I can't test this feature for lack of Windows software and hardware.

Could you test the branch and give me feedback if it works as expected?

Regards Alex