Commit 1aadb883 authored by Djorkaeff Alexandre's avatar Djorkaeff Alexandre Committed by Diego Mello
Browse files

[FIX] Server Test Push Notification (#1508)


Co-authored-by: default avatarDiego Mello <diegolmello@gmail.com>
parent f681a3e3
......@@ -61,7 +61,7 @@ public class CustomPushNotification extends PushNotification {
}
notificationMessages.get(notId).add(message);
super.postNotification(Integer.parseInt(notId));
super.postNotification(notId != null ? Integer.parseInt(notId) : 1);
notifyReceivedToJS();
}
......@@ -91,7 +91,7 @@ public class CustomPushNotification extends PushNotification {
.setDefaults(Notification.DEFAULT_ALL)
.setAutoCancel(true);
Integer notificationId = Integer.parseInt(notId);
Integer notificationId = notId != null ? Integer.parseInt(notId) : 1;
notificationChannel(notification);
notificationIcons(notification, bundle);
notificationStyle(notification, notificationId, bundle);
......
......@@ -14,7 +14,7 @@ public class Ejson {
private SharedPreferences sharedPreferences = RNUserDefaultsModule.getPreferences(CustomPushNotification.reactApplicationContext);
public String getAvatarUri() {
if (!type.equals("d")) {
if (type == null || !type.equals("d")) {
return null;
}
return serverURL() + "/avatar/" + this.sender.username + "?rc_token=" + token() + "&rc_uid=" + userId();
......
Supports Markdown
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