[FIX] Hide reply notification action when there are missing data (#1771)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
fac0958b8b
commit
5eb824aeb4
|
@ -252,7 +252,9 @@ public class CustomPushNotification extends PushNotification {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void notificationReply(Notification.Builder notification, int notificationId, Bundle bundle) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
String label = "Reply";
|
String label = "Reply";
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class Ejson {
|
||||||
|
|
||||||
public String serverURL() {
|
public String serverURL() {
|
||||||
String url = this.host;
|
String url = this.host;
|
||||||
if (url.endsWith("/")) {
|
if (url != null && url.endsWith("/")) {
|
||||||
url = url.substring(0, url.length() - 1);
|
url = url.substring(0, url.length() - 1);
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
|
|
Loading…
Reference in New Issue