From 14840af2abd9976b8f5634af8e77f4a7126dfac1 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Wed, 27 Jun 2018 15:55:19 +0500 Subject: - Rename NotificationException to MessageException - Simplify Notificator instantiation - Make sms configuration more clear - Move some defaults in code - Some cleanup --- src/org/traccar/notification/NotificationFormatter.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/org/traccar/notification/NotificationFormatter.java') 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, -- cgit v1.2.3