aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorRafaelMiquelino <rafaelmiquelino@gmail.com>2021-06-12 07:50:42 -0300
committerRafaelMiquelino <rafaelmiquelino@gmail.com>2021-06-12 07:50:42 -0300
commitb81874e057145cb7b4bb758a6d9f249c95a0c2d1 (patch)
treec8ed3542c48a90a4d2467080ebb38a5571ca1ae7 /src/main/java
parentb2f9dc30b30c82202168748cb7350568419b0aca (diff)
downloadtrackermap-server-b81874e057145cb7b4bb758a6d9f249c95a0c2d1.tar.gz
trackermap-server-b81874e057145cb7b4bb758a6d9f249c95a0c2d1.tar.bz2
trackermap-server-b81874e057145cb7b4bb758a6d9f249c95a0c2d1.zip
Modify NotificatorTelegram.java
Change chatId attribute name to "telegramChatId".
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);