aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorShinryuken <watertext@hotmail.it>2017-11-13 21:38:17 +0100
committerGitHub <noreply@github.com>2017-11-13 21:38:17 +0100
commitb86161aacf53a0f66dba43ee4933bf4c8e17f072 (patch)
treed9109334df982d097be43a694baff335008b14e1 /src/org/traccar
parent3363f82d05a02be3a035f984b1c7a365f327414f (diff)
downloadtraccar-server-b86161aacf53a0f66dba43ee4933bf4c8e17f072.tar.gz
traccar-server-b86161aacf53a0f66dba43ee4933bf4c8e17f072.tar.bz2
traccar-server-b86161aacf53a0f66dba43ee4933bf4c8e17f072.zip
removing NotificationFormatter from EventForwarder
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/notification/EventForwarder.java5
-rw-r--r--src/org/traccar/notification/FormTypeEventForwarder.java6
2 files changed, 1 insertions, 10 deletions
diff --git a/src/org/traccar/notification/EventForwarder.java b/src/org/traccar/notification/EventForwarder.java
index 4e5d75d68..c21799d74 100644
--- a/src/org/traccar/notification/EventForwarder.java
+++ b/src/org/traccar/notification/EventForwarder.java
@@ -39,7 +39,6 @@ public abstract class EventForwarder {
private String header;
private final String payloadParamName;
private final String additionalParams;
- private final boolean useTemplatesForPayload;
private final boolean prettyPrinted;
public EventForwarder() {
@@ -47,7 +46,6 @@ public abstract class EventForwarder {
header = Context.getConfig().getString("event.forward.header", "");
payloadParamName = Context.getConfig().getString("event.forward.paramMode.payloadParamName", "payload");
additionalParams = Context.getConfig().getString("event.forward.paramMode.additionalParams", "");
- useTemplatesForPayload = Context.getConfig().getBoolean("event.forward.paramMode.useTemplatesForPayload");
prettyPrinted = Context.getConfig().getBoolean("event.forward.prettyPrintedPayload");
}
@@ -127,9 +125,6 @@ public abstract class EventForwarder {
protected String getAdditionalParams() {
return additionalParams;
}
- protected boolean isUseTemplatesForPayload() {
- return useTemplatesForPayload;
- }
protected boolean isPrettyPrinted() {
return prettyPrinted;
}
diff --git a/src/org/traccar/notification/FormTypeEventForwarder.java b/src/org/traccar/notification/FormTypeEventForwarder.java
index e7564885d..dede95707 100644
--- a/src/org/traccar/notification/FormTypeEventForwarder.java
+++ b/src/org/traccar/notification/FormTypeEventForwarder.java
@@ -18,11 +18,7 @@ public class FormTypeEventForwarder extends EventForwarder {
requestBuilder.setFormParams(splitParams(getAdditionalParams(), "="));
}
- String payload = isUseTemplatesForPayload()
- ? NotificationFormatter.formatForwarderMessage(event, position)
- : prepareJsonPayload(event, position);
-
- requestBuilder.addFormParam(getPayloadParamName(), payload);
+ requestBuilder.addFormParam(getPayloadParamName(), prepareJsonPayload(event, position));
}
}