This commit is contained in:
Andrea Cavalli 2021-12-20 16:04:32 +01:00
parent e597baf533
commit 6f904af461
1 changed files with 6 additions and 2 deletions

View File

@ -54,8 +54,12 @@ public abstract class TelegramLongPollingSessionBot extends TelegramLongPollingB
onUpdateReceived(update, chatSession);
return;
}
chatIdConverter.setSessionId(message.getChatId());
chatSession = this.getSession(message);
if (message.getChat() != null) {
chatIdConverter.setSessionId(message.getChatId());
chatSession = this.getSession(message);
} else {
chatSession = Optional.empty();
}
onUpdateReceived(update, chatSession);
}