From 850d9616b3588cf8473d7d93280df69ea0f19c0c Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 18 Jan 2018 15:00:01 +0300 Subject: tg: log status of user deletion --- juick-api/src/main/java/com/juick/api/TelegramBotManager.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'juick-api') 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 { ); 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: {}", -- cgit v1.2.3