Commit 678ac354 authored by Simon Morlat's avatar Simon Morlat

Firebase: put all our user fields of push notifications into a data json...

Firebase: put all our user fields of push notifications into a data json object, as required by google.
parent ef240e04
Pipeline #6313 passed with stages
in 41 minutes and 3 seconds
......@@ -20,10 +20,13 @@ FirebasePushNotificationRequest::FirebasePushNotificationRequest(const PushInfo
ostringstream httpBody;
string date = getPushTimeStamp();
httpBody << "{\"to\":\"" << deviceToken << "\", \"priority\":\"high\"" << ", \"uuid\":" << quoteStringIfNeeded(pinfo.mUid)
<< ", \"call-id\":" << quoteStringIfNeeded(pinfo.mCallId)
<< ", \"from\":" << quoteStringIfNeeded(from)
<< ", \"send-time\":\"" << date << "\"}";
httpBody << "{\"to\":\"" << deviceToken << "\", \"priority\":\"high\""
<< ", \"data\":{"
<< "\"uuid\":" << quoteStringIfNeeded(pinfo.mUid)
<< ", \"call-id\":" << quoteStringIfNeeded(pinfo.mCallId)
<< ", \"from\":" << quoteStringIfNeeded(from)
<< ", \"send-time\":" << quoteStringIfNeeded(date) << "}"
<< "}";
mHttpBody = httpBody.str();
LOGD("Push notification https post body is %s", mHttpBody.c_str());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment