node-gcm-ccs
node-gcm-ccs copied to clipboard
CONNECTION_DRAINING
The connection draining control message does not have data.message_id set, currently the code is not handling the message because of this. The check should be removed for control messages.
Do you know what the expected behavior is? Is the check for data.message_id not needed?
According to the spec https://developers.google.com/cloud-messaging/ccs#response the expected format for the connection draining message(this is the only control message) is
<message>
<data:gcm xmlns:data="google:mobile:data">
{
"message_type":"control"
"control_type":"CONNECTION_DRAINING"
}
</data:gcm>
</message>
The other type of messages from the google servers will contain a message_id, but don't think we need to have the check assuming GCM sticks to the spec.