diff options
author | Anton Tananaev <anton@traccar.org> | 2022-06-07 06:48:53 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-06-07 06:48:53 -0700 |
commit | 8eecfdcf5c59f92158a6c339d1622e0e9d67968c (patch) | |
tree | f0bd5c9d391549ab7b98f87a86938a1341802a23 /src/main/java/org/traccar/database/NotificationManager.java | |
parent | 669bdccecff50eaca46c815598df092ad0fe143d (diff) | |
download | trackermap-server-8eecfdcf5c59f92158a6c339d1622e0e9d67968c.tar.gz trackermap-server-8eecfdcf5c59f92158a6c339d1622e0e9d67968c.tar.bz2 trackermap-server-8eecfdcf5c59f92158a6c339d1622e0e9d67968c.zip |
Pass user to notificators
Diffstat (limited to 'src/main/java/org/traccar/database/NotificationManager.java')
-rw-r--r-- | src/main/java/org/traccar/database/NotificationManager.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/database/NotificationManager.java b/src/main/java/org/traccar/database/NotificationManager.java index 64f3b6775..f88b3b18c 100644 --- a/src/main/java/org/traccar/database/NotificationManager.java +++ b/src/main/java/org/traccar/database/NotificationManager.java @@ -35,6 +35,7 @@ import org.traccar.model.Event; import org.traccar.model.Notification; import org.traccar.model.Position; import org.traccar.model.Typed; +import org.traccar.model.User; import org.traccar.storage.StorageException; public class NotificationManager extends ExtendedObjectManager<Notification> { @@ -106,8 +107,9 @@ public class NotificationManager extends ExtendedObjectManager<Notification> { .getAddress(position.getLatitude(), position.getLongitude(), null)); } + User user = Context.getUsersManager().getById(userId); for (String notificator : notificators) { - Context.getNotificatorManager().getNotificator(notificator).sendAsync(userId, event, position); + Context.getNotificatorManager().getNotificator(notificator).sendAsync(user, event, position); } } if (Context.getEventForwarder() != null) { |