[FIX] Server Test Push Notification (#1508)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
f681a3e33f
commit
1aadb88392
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue