diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/traccar/database/NotificationManager.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/database/NotificationManager.java b/src/main/java/org/traccar/database/NotificationManager.java index 09df4c571..7d2a1bb2e 100644 --- a/src/main/java/org/traccar/database/NotificationManager.java +++ b/src/main/java/org/traccar/database/NotificationManager.java @@ -92,9 +92,12 @@ public class NotificationManager extends ExtendedObjectManager<Notification> { if (getById(notificationId).getType().equals(event.getType())) { boolean filter = false; if (event.getType().equals(Event.TYPE_ALARM)) { - String alarms = notification.getString("alarms"); - if (alarms == null || !alarms.contains(event.getString(Position.KEY_ALARM))) { + String alarmsAttribute = notification.getString("alarms"); + if (alarmsAttribute == null) { filter = true; + } else { + List<String> alarms = Arrays.asList(alarmsAttribute.split(",")); + filter = !alarms.contains(event.getString(Position.KEY_ALARM)); } } if (!filter) { |