aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/NotificationManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/database/NotificationManager.java')
-rw-r--r--src/org/traccar/database/NotificationManager.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/org/traccar/database/NotificationManager.java b/src/org/traccar/database/NotificationManager.java
index a10fbf69a..2c1ffc09c 100644
--- a/src/org/traccar/database/NotificationManager.java
+++ b/src/org/traccar/database/NotificationManager.java
@@ -76,8 +76,10 @@ public class NotificationManager extends ExtendedObjectManager<Notification> {
usersToForward = new HashSet<>();
}
for (long userId : users) {
- if (event.getGeofenceId() == 0 || Context.getGeofenceManager() != null
- && Context.getGeofenceManager().checkItemPermission(userId, event.getGeofenceId())) {
+ if ((event.getGeofenceId() == 0
+ || Context.getGeofenceManager().checkItemPermission(userId, event.getGeofenceId()))
+ && (event.getMaintenanceId() == 0
+ || Context.getMaintenancesManager().checkItemPermission(userId, event.getMaintenanceId()))) {
if (usersToForward != null) {
usersToForward.add(userId);
}