Log additional details for missing chat IDs and simplify close method signature.

This commit is contained in:
2026-03-29 09:38:56 +03:00
parent fc7ba16fab
commit 10b1b430e6
@@ -17,6 +17,7 @@ public class PengradTelegramBot extends TelegramBot implements AutoCloseable {
final Long chatId = findChatId(update);
if (chatId == null) {
log.warn("Chat not found, Update [id={}]", update.updateId());
log.info("Details: {}", update);
continue;
}
log.debug("New message in chat {}", chatId);
@@ -33,7 +34,7 @@ public class PengradTelegramBot extends TelegramBot implements AutoCloseable {
}
@Override
public void close() throws Exception {
public void close() {
removeGetUpdatesListener();
log.debug("Bot closed.");
}