aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com/juick/api
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-01-18 15:00:01 +0300
committerGravatar Vitaly Takmazov2018-01-18 15:01:21 +0300
commit850d9616b3588cf8473d7d93280df69ea0f19c0c (patch)
tree8aea900083b2ce39cd795e950bfbfe51d5c85ea9 /juick-api/src/main/java/com/juick/api
parente1aed221ca65978f67cdb205e603cfb3178a186f (diff)
tg: log status of user deletion
Diffstat (limited to 'juick-api/src/main/java/com/juick/api')
-rw-r--r--juick-api/src/main/java/com/juick/api/TelegramBotManager.java9
1 files changed, 6 insertions, 3 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 a75804bb..c2eeefd3 100644
--- a/juick-api/src/main/java/com/juick/api/TelegramBotManager.java
+++ b/juick-api/src/main/java/com/juick/api/TelegramBotManager.java
@@ -253,9 +253,12 @@ 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)
- .orElse(new User()).getName());
+ User userToDelete = userService.getUserByUID(userId)
+ .orElse(new User());
+ boolean status = telegramService.deleteTelegramUser(chatId.intValue());
+ logger.info("deleting telegram id of @{} : {}", userToDelete.getName(), status);
+ boolean chatStatus = telegramService.deleteChat(chatId);
+ logger.info("deleting telegram chat {} : {}", chatId, chatStatus);
}
} else {
logger.warn("error response, isOk: {}, errorCode: {}, description: {}",