aboutsummaryrefslogtreecommitdiff
path: root/juick-api
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-01-17 13:53:19 +0300
committerGravatar Vitaly Takmazov2018-01-17 13:53:19 +0300
commitdadfbdb7379ebe9623643902a6a0aa78ca528228 (patch)
treed1319d8af6f6e17432e4d4df14adc24c69ec1179 /juick-api
parentf641853214daace2a73503f3a78e1f9ba29fd386 (diff)
api: fix username logging
Diffstat (limited to 'juick-api')
-rw-r--r--juick-api/src/main/java/com/juick/api/TelegramBotManager.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/juick-api/src/main/java/com/juick/api/TelegramBotManager.java b/juick-api/src/main/java/com/juick/api/TelegramBotManager.java
index 757dd347..321ad7b1 100644
--- a/juick-api/src/main/java/com/juick/api/TelegramBotManager.java
+++ b/juick-api/src/main/java/com/juick/api/TelegramBotManager.java
@@ -17,6 +17,7 @@
package com.juick.api;
+import com.juick.User;
import com.juick.server.component.MessageEvent;
import com.juick.service.MessagesService;
import com.juick.service.SubscriptionService;
@@ -134,7 +135,8 @@ public class TelegramBotManager implements ApplicationListener<MessageEvent> {
int userId = telegramService.getUser(chatId);
if (userId > 0) {
telegramService.deleteTelegramUser(chatId.intValue());
- logger.info("deleted telegram id of @{}", userService.getUserByUID(userId));
+ logger.info("deleted telegram id of @{}", userService.getUserByUID(userId)
+ .orElse(new User()).getName());
}
} else {
logger.warn("error response, isOk: {}, errorCode: {}, description: {}",