diff options
author | Abyss777 <abyss@fox5.ru> | 2018-03-20 16:30:08 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2018-03-20 16:30:08 +0500 |
commit | 02e3f0f196c9dc1227b1074ff39f52efd7ab418c (patch) | |
tree | 9eaca738af355bc2c92471820080c871c1bd0d2a /src/org/traccar/notification/MultiPartEventForwarder.java | |
parent | 38c1ff9bccc1c417a0c2b412271aa7240a3b7db7 (diff) | |
download | trackermap-server-02e3f0f196c9dc1227b1074ff39f52efd7ab418c.tar.gz trackermap-server-02e3f0f196c9dc1227b1074ff39f52efd7ab418c.tar.bz2 trackermap-server-02e3f0f196c9dc1227b1074ff39f52efd7ab418c.zip |
Add user objects to Event forward payload
Diffstat (limited to 'src/org/traccar/notification/MultiPartEventForwarder.java')
-rw-r--r-- | src/org/traccar/notification/MultiPartEventForwarder.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/notification/MultiPartEventForwarder.java b/src/org/traccar/notification/MultiPartEventForwarder.java index f4c36d3e4..6227c66cc 100644 --- a/src/org/traccar/notification/MultiPartEventForwarder.java +++ b/src/org/traccar/notification/MultiPartEventForwarder.java @@ -3,6 +3,7 @@ package org.traccar.notification; import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.Map.Entry; import org.traccar.Context; @@ -28,7 +29,7 @@ public class MultiPartEventForwarder extends EventForwarder { } @Override - protected void setContent(Event event, Position position, BoundRequestBuilder requestBuilder) { + protected void setContent(Event event, Position position, Set<Long> users, BoundRequestBuilder requestBuilder) { if (additionalParams != null && !additionalParams.isEmpty()) { Map<String, List<String>> paramsToAdd = splitIntoKeyValues(additionalParams, "="); @@ -41,6 +42,6 @@ public class MultiPartEventForwarder extends EventForwarder { } } requestBuilder.addBodyPart(new StringPart(payloadParamName, - prepareJsonPayload(event, position), "application/json", StandardCharsets.UTF_8)); + prepareJsonPayload(event, position, users), "application/json", StandardCharsets.UTF_8)); } } |