aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r--src/org/traccar/database/NotificationManager.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/org/traccar/database/NotificationManager.java b/src/org/traccar/database/NotificationManager.java
index b2a30e4f1..5dcb1d317 100644
--- a/src/org/traccar/database/NotificationManager.java
+++ b/src/org/traccar/database/NotificationManager.java
@@ -83,16 +83,15 @@ public class NotificationManager extends ExtendedObjectManager<Notification> {
if (usersToForward != null) {
usersToForward.add(userId);
}
- final Set<String> notificationMethods = new HashSet<>();
+ final Set<String> notificators = new HashSet<>();
for (long notificationId : getEffectiveNotifications(userId, deviceId, event.getServerTime())) {
Notification notification = getById(notificationId);
if (getById(notificationId).getType().equals(event.getType())) {
- notificationMethods.addAll(notification.getTransportMethods());
+ notificators.addAll(notification.getNotificatorsTypes());
}
}
- for (String notificationMethod : notificationMethods) {
- Context.getNotificatorManager()
- .getNotificator(notificationMethod).sendAsync(userId, event, position);
+ for (String notificator : notificators) {
+ Context.getNotificatorManager().getNotificator(notificator).sendAsync(userId, event, position);
}
}
}