Unverified Commit 5eb824ae authored by Djorkaeff Alexandre's avatar Djorkaeff Alexandre Committed by GitHub
Browse files

[FIX] Hide reply notification action when there are missing data (#1771)


Co-authored-by: default avatarDiego Mello <diegolmello@gmail.com>
parent fac0958b
......@@ -252,7 +252,9 @@ public class CustomPushNotification extends PushNotification {
}
private void notificationReply(Notification.Builder notification, int notificationId, Bundle bundle) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
String notId = bundle.getString("notId", "1");
String ejson = bundle.getString("ejson", "{}");
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N || notId.equals("1") || ejson.equals("{}")) {
return;
}
String label = "Reply";
......
......@@ -30,7 +30,7 @@ public class Ejson {
public String serverURL() {
String url = this.host;
if (url.endsWith("/")) {
if (url != null && url.endsWith("/")) {
url = url.substring(0, url.length() - 1);
}
return url;
......
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