aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorwkhaksar <31837615+wkhaksar@users.noreply.github.com>2021-11-04 17:31:21 +0100
committerGitHub <noreply@github.com>2021-11-04 17:31:21 +0100
commitf3b8aa2e7355ca7bf7a8cf8c60e703300361cfe1 (patch)
treef196b41491ca4d44c4f3309573514508b2536d1e /src/main/java
parent2f9d311f31e25c89527c1e0bcc16e57232e22ce9 (diff)
downloadtrackermap-server-f3b8aa2e7355ca7bf7a8cf8c60e703300361cfe1.tar.gz
trackermap-server-f3b8aa2e7355ca7bf7a8cf8c60e703300361cfe1.tar.bz2
trackermap-server-f3b8aa2e7355ca7bf7a8cf8c60e703300361cfe1.zip
Update src/main/java/org/traccar/notification/TextTemplateFormatter.java
Co-authored-by: Anton Tananaev <anton.tananaev@gmail.com>
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/notification/TextTemplateFormatter.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/notification/TextTemplateFormatter.java b/src/main/java/org/traccar/notification/TextTemplateFormatter.java
index 6a95628f0..b7058c824 100644
--- a/src/main/java/org/traccar/notification/TextTemplateFormatter.java
+++ b/src/main/java/org/traccar/notification/TextTemplateFormatter.java
@@ -74,8 +74,7 @@ public final class TextTemplateFormatter {
public static NotificationMessage formatMessage(VelocityContext velocityContext, String name, String templatePath) {
StringWriter writer = new StringWriter();
getTemplate(name, templatePath).merge(velocityContext, writer);
- String formattedMessage = writer.toString();
- return new NotificationMessage((String) velocityContext.get("subject"), formattedMessage);
+ return new NotificationMessage((String) velocityContext.get("subject"), writer.toString());
}
}