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);
|
final Long chatId = findChatId(update);
|
||||||
if (chatId == null) {
|
if (chatId == null) {
|
||||||
log.warn("Chat not found, Update [id={}]", update.updateId());
|
log.warn("Chat not found, Update [id={}]", update.updateId());
|
||||||
|
log.info("Details: {}", update);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
log.debug("New message in chat {}", chatId);
|
log.debug("New message in chat {}", chatId);
|
||||||
@@ -33,7 +34,7 @@ public class PengradTelegramBot extends TelegramBot implements AutoCloseable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close() throws Exception {
|
public void close() {
|
||||||
removeGetUpdatesListener();
|
removeGetUpdatesListener();
|
||||||
log.debug("Bot closed.");
|
log.debug("Bot closed.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user