use snake case for payload keys

This commit is contained in:
Akinwale Ariwodola 2020-03-12 21:16:39 +01:00
parent d38241f0d1
commit 364de592fa

View file

@ -57,12 +57,10 @@ public class LbrynetMessagingService extends FirebaseMessagingService {
String title = payload.get("title"); String title = payload.get("title");
String body = payload.get("body"); String body = payload.get("body");
String name = payload.get("name"); // notification name String name = payload.get("name"); // notification name
String contentTitle = payload.get("contentTitle"); String contentTitle = payload.get("content_title");
String channelUrl = payload.get("channelUrl"); String channelUrl = payload.get("channel_url");
String publishTime = payload.get("publishTime"); //String publishTime = payload.get("publish_time");
for (Map.Entry<String, String> entry : payload.entrySet()) { String publishTime = null;
android.util.Log.d("ReactNativeJS", "payload[" + entry.getKey() + "]=" + entry.getValue());
}
if (type != null && getEnabledTypes().indexOf(type) > -1 && body != null && body.trim().length() > 0) { if (type != null && getEnabledTypes().indexOf(type) > -1 && body != null && body.trim().length() > 0) {
// only log the receive event for valid notifications received // only log the receive event for valid notifications received
if (firebaseAnalytics != null) { if (firebaseAnalytics != null) {