Log additional details for missing chat IDs and simplify close method signature.
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user