aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/notification/NotificationFormatter.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-06-27 15:55:19 +0500
committerAbyss777 <abyss@fox5.ru>2018-06-27 15:55:19 +0500
commit14840af2abd9976b8f5634af8e77f4a7126dfac1 (patch)
treed9bd2bc190a1a67bda345cc804f3b21d20416cec /src/org/traccar/notification/NotificationFormatter.java
parentb70e46560359a181b0136fa1c6b0400615bfc904 (diff)
downloadtrackermap-server-14840af2abd9976b8f5634af8e77f4a7126dfac1.tar.gz
trackermap-server-14840af2abd9976b8f5634af8e77f4a7126dfac1.tar.bz2
trackermap-server-14840af2abd9976b8f5634af8e77f4a7126dfac1.zip
- Rename NotificationException to MessageException
- Simplify Notificator instantiation - Make sms configuration more clear - Move some defaults in code - Some cleanup
Diffstat (limited to 'src/org/traccar/notification/NotificationFormatter.java')
-rw-r--r--src/org/traccar/notification/NotificationFormatter.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/org/traccar/notification/NotificationFormatter.java b/src/org/traccar/notification/NotificationFormatter.java
index a1abdd0cc..c011403c5 100644
--- a/src/org/traccar/notification/NotificationFormatter.java
+++ b/src/org/traccar/notification/NotificationFormatter.java
@@ -89,17 +89,14 @@ public final class NotificationFormatter {
}
public static FullMessage formatFullMessage(long userId, Event event, Position position) {
- String templatePath = Context.getConfig().getString("message.full.templatesPath", "full");
VelocityContext velocityContext = prepareContext(userId, event, position);
- String formattedMessage = formatMessage(velocityContext, userId, event, position, templatePath);
+ String formattedMessage = formatMessage(velocityContext, userId, event, position, "full");
return new FullMessage((String) velocityContext.get("subject"), formattedMessage);
}
public static String formatShortMessage(long userId, Event event, Position position) {
- String templatePath = Context.getConfig().getString("message.short.templatesPath", "short");
-
- return formatMessage(null, userId, event, position, templatePath);
+ return formatMessage(null, userId, event, position, "short");
}
private static String formatMessage(VelocityContext vc, Long userId, Event event, Position position,