ToothlessGear / node-gcm

A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
https://github.com/ToothlessGear/node-gcm
Other
1.3k stars 208 forks source link

Disallow data.from in the Message payload #254

Closed paul-matthews closed 7 years ago

paul-matthews commented 8 years ago

On creation of FCM messages, log a warning or error for addData('from', 'xxx'); As this causes a 400 error with FCM.

eladnava commented 8 years ago

Hi @paul-matthews,

Can you please link to where this is specified in the FCM docs? I wasn't able to find it in the FCM App Server Protocol.

hypesystem commented 8 years ago

It doesn't say in the documentation, but I experienced this, too, at some point. I think this is a good addition, both for master and v1 branches.

@paul-matthews if you're up for it, a PR would be super nice