Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Commit

Permalink
🐧🐛 Issue #1710: Notification message key overwritten
Browse files Browse the repository at this point in the history
Handle case when message is a string and not a JSON object
  • Loading branch information
macdonst committed May 15, 2017
1 parent 4eadccd commit 911a1d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/android/com/adobe/phonegap/push/GCMIntentService.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ private Bundle normalizeExtras(Context context, Bundle extras, String messageKey
} catch( JSONException e) {
Log.e(LOG_TAG, "normalizeExtras: JSON exception");
}
} else {
String newKey = normalizeKey(key, messageKey, titleKey);
Log.d(LOG_TAG, "replace key " + key + " with " + newKey);
replaceKey(context, key, newKey, extras, newExtras);
}
} else if (key.equals(("notification"))) {
Bundle value = extras.getBundle(key);
Expand Down

0 comments on commit 911a1d4

Please sign in to comment.