From 87455349439476000bcc78c9bca5ff8fd5fc2a6c Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 18 Jan 2018 15:11:32 +0300 Subject: tg: fix user deletion on 403 --- juick-api/src/main/java/com/juick/api/TelegramBotManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'juick-api/src/main/java/com') 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 c2eeefd3..54dab247 100644 --- a/juick-api/src/main/java/com/juick/api/TelegramBotManager.java +++ b/juick-api/src/main/java/com/juick/api/TelegramBotManager.java @@ -255,7 +255,7 @@ public class TelegramBotManager implements ApplicationListener { if (userId > 0) { User userToDelete = userService.getUserByUID(userId) .orElse(new User()); - boolean status = telegramService.deleteTelegramUser(chatId.intValue()); + boolean status = telegramService.deleteTelegramUser(userToDelete.getUid()); logger.info("deleting telegram id of @{} : {}", userToDelete.getName(), status); boolean chatStatus = telegramService.deleteChat(chatId); logger.info("deleting telegram chat {} : {}", chatId, chatStatus); -- cgit v1.2.3