diff options
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/traccar/notificators/NotificatorTelegram.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/notificators/NotificatorTelegram.java b/src/main/java/org/traccar/notificators/NotificatorTelegram.java index bd23684d4..963bdb091 100644 --- a/src/main/java/org/traccar/notificators/NotificatorTelegram.java +++ b/src/main/java/org/traccar/notificators/NotificatorTelegram.java @@ -81,7 +81,7 @@ public class NotificatorTelegram extends Notificator { }); } - private LocationMessage createMessage(Position position) { + private LocationMessage createLocationMessage(Position position) { LocationMessage locationMessage = new LocationMessage(); locationMessage.chatId = chatId; locationMessage.latitude = position.getLatitude(); @@ -94,8 +94,7 @@ public class NotificatorTelegram extends Notificator { @Override public void sendSync(long userId, Event event, Position position) { if (position != null) { - LocationMessage locationMessage = createMessage(position); - executeRequest(urlSendLocation, locationMessage); + executeRequest(urlSendLocation, createLocationMessage(position)); } TextMessage message = new TextMessage(); message.chatId = chatId; |