aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/notification
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/notification')
-rw-r--r--src/main/java/org/traccar/notification/NotificationFormatter.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/notification/NotificationFormatter.java b/src/main/java/org/traccar/notification/NotificationFormatter.java
index c3e37c9e9..be90761b1 100644
--- a/src/main/java/org/traccar/notification/NotificationFormatter.java
+++ b/src/main/java/org/traccar/notification/NotificationFormatter.java
@@ -17,7 +17,6 @@
package org.traccar.notification;
import org.apache.velocity.VelocityContext;
-import org.traccar.Context;
import org.traccar.model.Device;
import org.traccar.model.Event;
import org.traccar.model.Geofence;
@@ -55,7 +54,7 @@ public final class NotificationFormatter {
}
String driverUniqueId = event.getString(Position.KEY_DRIVER_UNIQUE_ID);
if (driverUniqueId != null) {
- velocityContext.put("driver", Context.getDriversManager().getDriverByUniqueId(driverUniqueId));
+ velocityContext.put("driver", cacheManager.findDriverByUniqueId(device.getId(), driverUniqueId));
}
return TextTemplateFormatter.formatMessage(velocityContext, event.getType(), templatePath);