From 2891a1a4eee21e6c80b65915d35558c033503047 Mon Sep 17 00:00:00 2001 From: Ivan Martinez Date: Sun, 1 Apr 2018 18:22:29 -0300 Subject: generalization for notifications processing --- src/org/traccar/notification/NotificationSms.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org/traccar/notification/NotificationSms.java') diff --git a/src/org/traccar/notification/NotificationSms.java b/src/org/traccar/notification/NotificationSms.java index 34d68e174..a8eaff798 100644 --- a/src/org/traccar/notification/NotificationSms.java +++ b/src/org/traccar/notification/NotificationSms.java @@ -27,7 +27,7 @@ public final class NotificationSms extends Notificator { @Override public void sendAsync(long userId, Event event, Position position) { User user = Context.getPermissionsManager().getUser(userId); - if (Context.getSmsManager() != null && user.getPhone() != null) { + if (user.getPhone() != null) { Context.getStatisticsManager().registerSms(); Context.getSmsManager().sendMessageAsync(user.getPhone(), NotificationFormatter.formatSmsMessage(userId, event, position), false); @@ -38,7 +38,7 @@ public final class NotificationSms extends Notificator { public void sendSync(long userId, Event event, Position position) throws SMSException, InterruptedException { User user = Context.getPermissionsManager().getUser(userId); - if (Context.getSmsManager() != null && user.getPhone() != null) { + if (user.getPhone() != null) { Context.getStatisticsManager().registerSms(); Context.getSmsManager().sendMessageSync(user.getPhone(), NotificationFormatter.formatSmsMessage(userId, event, position), false); -- cgit v1.2.3