aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/notification/NotificationFormatter.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-11-05 09:34:01 -0700
committerGitHub <noreply@github.com>2021-11-05 09:34:01 -0700
commitfb26fa078fc3299112108a682004f41e767d397b (patch)
treeef6d4bc4fa9f2b883dc7fc6512476281a0d1e45e /src/main/java/org/traccar/notification/NotificationFormatter.java
parent54e0ed6aa3fb39c344a2aaf68eb0b03967e912ef (diff)
parentc370aa660d216980a0c8f52ca856b4116ff5ca23 (diff)
downloadtrackermap-server-fb26fa078fc3299112108a682004f41e767d397b.tar.gz
trackermap-server-fb26fa078fc3299112108a682004f41e767d397b.tar.bz2
trackermap-server-fb26fa078fc3299112108a682004f41e767d397b.zip
Merge pull request #4763 from wkhaksar/push-notifications-title
Title for push notifications
Diffstat (limited to 'src/main/java/org/traccar/notification/NotificationFormatter.java')
-rw-r--r--src/main/java/org/traccar/notification/NotificationFormatter.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/main/java/org/traccar/notification/NotificationFormatter.java b/src/main/java/org/traccar/notification/NotificationFormatter.java
index dabc75b8b..9a6723a71 100644
--- a/src/main/java/org/traccar/notification/NotificationFormatter.java
+++ b/src/main/java/org/traccar/notification/NotificationFormatter.java
@@ -58,14 +58,9 @@ public final class NotificationFormatter {
return velocityContext;
}
- public static FullMessage formatFullMessage(long userId, Event event, Position position) {
+ public static NotificationMessage formatMessage(long userId, Event event, Position position, String templatePath) {
VelocityContext velocityContext = prepareContext(userId, event, position);
- return TextTemplateFormatter.formatFullMessage(velocityContext, event.getType());
- }
-
- public static String formatShortMessage(long userId, Event event, Position position) {
- VelocityContext velocityContext = prepareContext(userId, event, position);
- return TextTemplateFormatter.formatShortMessage(velocityContext, event.getType());
+ return TextTemplateFormatter.formatMessage(velocityContext, event.getType(), templatePath);
}
}