Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

[Android] Remove default alert for silent push notifications #707

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void onMessageReceived(String from, final Bundle bundle) {
JSONObject data = getPushData(bundle.getString("data"));
if (data != null) {
if (!bundle.containsKey("message")) {
bundle.putString("message", data.optString("alert", "Notification received"));
bundle.putString("message", data.optString("alert", null));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zo0r is there a reason why alert is used as the field and not message?

}
if (!bundle.containsKey("title")) {
bundle.putString("title", data.optString("title", null));
Expand Down