diff options
author | Abyss777 <abyss@fox5.ru> | 2018-06-27 15:55:19 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2018-06-27 15:55:19 +0500 |
commit | 14840af2abd9976b8f5634af8e77f4a7126dfac1 (patch) | |
tree | d9bd2bc190a1a67bda345cc804f3b21d20416cec /src/org/traccar/notification/NotificationFormatter.java | |
parent | b70e46560359a181b0136fa1c6b0400615bfc904 (diff) | |
download | trackermap-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.java | 7 |
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, |