aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/notificators/NotificatorTelegram.java5
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 25dc7567f..00baa2540 100644
--- a/src/main/java/org/traccar/notificators/NotificatorTelegram.java
+++ b/src/main/java/org/traccar/notificators/NotificatorTelegram.java
@@ -97,9 +97,8 @@ public class NotificatorTelegram extends Notificator {
public void sendSync(long userId, Event event, Position position) {
User user = Context.getPermissionsManager().getUser(userId);
TextMessage message = new TextMessage();
- if (user.getAttributes().containsKey("notificationTelegramChatId")) {
- message.chatId = user.getString("notificationTelegramChatId");
- } else {
+ message.chatId = user.getString("telegramChatId");
+ if (message.chatId == null) {
message.chatId = chatId;
}
message.text = NotificationFormatter.formatShortMessage(userId, event, position);