aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/notificators/NotificatorTelegram.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/org/traccar/notificators/NotificatorTelegram.java b/src/main/java/org/traccar/notificators/NotificatorTelegram.java
index 963bdb091..cd6fb0c45 100644
--- a/src/main/java/org/traccar/notificators/NotificatorTelegram.java
+++ b/src/main/java/org/traccar/notificators/NotificatorTelegram.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019 - 2020 Anton Tananaev (anton@traccar.org)
+ * Copyright 2019 - 2021 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -93,13 +93,13 @@ public class NotificatorTelegram extends Notificator {
@Override
public void sendSync(long userId, Event event, Position position) {
- if (position != null) {
- executeRequest(urlSendLocation, createLocationMessage(position));
- }
TextMessage message = new TextMessage();
message.chatId = chatId;
- message.text = NotificationFormatter.formatFullMessage(userId, event, position).getBody();
+ message.text = NotificationFormatter.formatShortMessage(userId, event, position);
executeRequest(urlSendText, message);
+ if (position != null) {
+ executeRequest(urlSendLocation, createLocationMessage(position));
+ }
}
@Override