aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/notificators
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-25 13:33:35 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-25 13:33:35 -0700
commitc53d98c668af9c79767e22964f05c7bf7dc866f2 (patch)
tree42d664009487232e3a21514bb5ab52c7571262a6 /src/main/java/org/traccar/notificators
parent5a732a26c85785a9b801583f2fff0ce47314aa03 (diff)
downloadtrackermap-server-c53d98c668af9c79767e22964f05c7bf7dc866f2.tar.gz
trackermap-server-c53d98c668af9c79767e22964f05c7bf7dc866f2.tar.bz2
trackermap-server-c53d98c668af9c79767e22964f05c7bf7dc866f2.zip
Integrate broadcast service
Diffstat (limited to 'src/main/java/org/traccar/notificators')
-rw-r--r--src/main/java/org/traccar/notificators/NotificatorWeb.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/notificators/NotificatorWeb.java b/src/main/java/org/traccar/notificators/NotificatorWeb.java
index 3d899584d..efbbf24cc 100644
--- a/src/main/java/org/traccar/notificators/NotificatorWeb.java
+++ b/src/main/java/org/traccar/notificators/NotificatorWeb.java
@@ -16,6 +16,7 @@
*/
package org.traccar.notificators;
+import org.traccar.broadcast.BroadcastService;
import org.traccar.model.Event;
import org.traccar.model.Position;
import org.traccar.model.User;
@@ -27,11 +28,15 @@ import javax.inject.Inject;
public final class NotificatorWeb implements Notificator {
private final ConnectionManager connectionManager;
+ private final BroadcastService broadcastService;
private final NotificationFormatter notificationFormatter;
@Inject
- public NotificatorWeb(ConnectionManager connectionManager, NotificationFormatter notificationFormatter) {
+ public NotificatorWeb(
+ ConnectionManager connectionManager, BroadcastService broadcastService,
+ NotificationFormatter notificationFormatter) {
this.connectionManager = connectionManager;
+ this.broadcastService = broadcastService;
this.notificationFormatter = notificationFormatter;
}
@@ -52,6 +57,7 @@ public final class NotificatorWeb implements Notificator {
copy.set("message", message.getBody());
connectionManager.updateEvent(user.getId(), copy);
+ broadcastService.updateEvent(user.getId(), copy);
}
}