aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/notification/NotificationFormatter.java
diff options
context:
space:
mode:
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, 7 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/notification/NotificationFormatter.java b/src/main/java/org/traccar/notification/NotificationFormatter.java
index 9a6723a71..dabc75b8b 100644
--- a/src/main/java/org/traccar/notification/NotificationFormatter.java
+++ b/src/main/java/org/traccar/notification/NotificationFormatter.java
@@ -58,9 +58,14 @@ public final class NotificationFormatter {
return velocityContext;
}
- public static NotificationMessage formatMessage(long userId, Event event, Position position, String templatePath) {
+ public static FullMessage formatFullMessage(long userId, Event event, Position position) {
VelocityContext velocityContext = prepareContext(userId, event, position);
- return TextTemplateFormatter.formatMessage(velocityContext, event.getType(), templatePath);
+ 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());
}
}