aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/notificators
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/notificators')
-rw-r--r--src/main/java/org/traccar/notificators/NotificatorFirebase.java2
-rw-r--r--src/main/java/org/traccar/notificators/NotificatorPushover.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/notificators/NotificatorFirebase.java b/src/main/java/org/traccar/notificators/NotificatorFirebase.java
index 5787b7ef2..17a6735ee 100644
--- a/src/main/java/org/traccar/notificators/NotificatorFirebase.java
+++ b/src/main/java/org/traccar/notificators/NotificatorFirebase.java
@@ -69,7 +69,7 @@ public class NotificatorFirebase implements Notificator {
@Override
public void send(User user, Event event, Position position) {
- if (user.getAttributes().containsKey("notificationTokens")) {
+ if (user.hasAttribute("notificationTokens")) {
var shortMessage = notificationFormatter.formatMessage(user, event, position, "short");
diff --git a/src/main/java/org/traccar/notificators/NotificatorPushover.java b/src/main/java/org/traccar/notificators/NotificatorPushover.java
index 32ceae780..671984f86 100644
--- a/src/main/java/org/traccar/notificators/NotificatorPushover.java
+++ b/src/main/java/org/traccar/notificators/NotificatorPushover.java
@@ -65,7 +65,7 @@ public class NotificatorPushover implements Notificator {
public void send(User user, Event event, Position position) {
String device = "";
- if (user.getAttributes().containsKey("notificator.pushover.device")) {
+ if (user.hasAttribute("notificator.pushover.device")) {
device = user.getString("notificator.pushover.device").replaceAll(" *, *", ",");
}