diff options
author | Anton Tananaev <anton@traccar.org> | 2023-12-03 14:08:07 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-12-03 14:08:07 -0800 |
commit | 8999283ee7344fd7ec33c8a6cb5a7999e0592074 (patch) | |
tree | 7d9c69c34b04b74560fabd1a89c4a6042398613c /src/main/java/org/traccar/notificators | |
parent | 1efe470d4df335dfaaad5a9e2c6417c24d8864e1 (diff) | |
download | trackermap-server-8999283ee7344fd7ec33c8a6cb5a7999e0592074.tar.gz trackermap-server-8999283ee7344fd7ec33c8a6cb5a7999e0592074.tar.bz2 trackermap-server-8999283ee7344fd7ec33c8a6cb5a7999e0592074.zip |
Update broadcast interface
Diffstat (limited to 'src/main/java/org/traccar/notificators')
-rw-r--r-- | src/main/java/org/traccar/notificators/NotificatorFirebase.java | 3 | ||||
-rw-r--r-- | src/main/java/org/traccar/notificators/NotificatorTraccar.java | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/notificators/NotificatorFirebase.java b/src/main/java/org/traccar/notificators/NotificatorFirebase.java index be95fb28e..0402db49d 100644 --- a/src/main/java/org/traccar/notificators/NotificatorFirebase.java +++ b/src/main/java/org/traccar/notificators/NotificatorFirebase.java @@ -29,6 +29,7 @@ import com.google.firebase.messaging.MessagingErrorCode; import com.google.firebase.messaging.MulticastMessage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.traccar.broadcast.ObjectOperation; import org.traccar.config.Config; import org.traccar.config.Keys; import org.traccar.model.Event; @@ -135,7 +136,7 @@ public class NotificatorFirebase implements Notificator { storage.updateObject(user, new Request( new Columns.Include("attributes"), new Condition.Equals("id", user.getId()))); - cacheManager.updateOrInvalidate(true, user); + cacheManager.updateOrInvalidate(true, user, ObjectOperation.UPDATE); } } catch (FirebaseMessagingException | StorageException e) { LOGGER.warn("Firebase error", e); diff --git a/src/main/java/org/traccar/notificators/NotificatorTraccar.java b/src/main/java/org/traccar/notificators/NotificatorTraccar.java index e354adccb..f693e9f30 100644 --- a/src/main/java/org/traccar/notificators/NotificatorTraccar.java +++ b/src/main/java/org/traccar/notificators/NotificatorTraccar.java @@ -18,6 +18,7 @@ package org.traccar.notificators; import com.fasterxml.jackson.annotation.JsonProperty; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.traccar.broadcast.ObjectOperation; import org.traccar.config.Config; import org.traccar.config.Keys; import org.traccar.model.Event; @@ -128,7 +129,7 @@ public class NotificatorTraccar implements Notificator { storage.updateObject(user, new Request( new Columns.Include("attributes"), new Condition.Equals("id", user.getId()))); - cacheManager.updateOrInvalidate(true, user); + cacheManager.updateOrInvalidate(true, user, ObjectOperation.UPDATE); } } catch (StorageException e) { LOGGER.warn("Push error", e); |