Добавил возможность отвечать на сообщения

This commit is contained in:
Struchkov Mark 2023-05-10 00:39:17 +03:00
parent e00f683226
commit 6936e252f4
Signed by: upagge
GPG Key ID: D3018BE7BA428CA6
2 changed files with 5 additions and 1 deletions

View File

@ -38,7 +38,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<godfather.core.ver>0.0.64</godfather.core.ver> <godfather.core.ver>0.0.65</godfather.core.ver>
<!-- https://mvnrepository.com/artifact/org.telegram/telegrambots --> <!-- https://mvnrepository.com/artifact/org.telegram/telegrambots -->
<telegrambots.ver>6.5.0</telegrambots.ver> <telegrambots.ver>6.5.0</telegrambots.ver>

View File

@ -332,6 +332,10 @@ public class TelegramSender implements TelegramSending {
final SendMessage sendMessage = new SendMessage(); final SendMessage sendMessage = new SendMessage();
sendMessage.setChatId(boxAnswer.getRecipientPersonId()); sendMessage.setChatId(boxAnswer.getRecipientPersonId());
sendMessage.setText(subMessage); sendMessage.setText(subMessage);
if (checkNotBlank(boxAnswer.getReplyToMessageId())) {
sendMessage.setReplyToMessageId(Integer.parseInt(boxAnswer.getReplyToMessageId()));
}
if (lastMessage) { if (lastMessage) {
sendMessage.setReplyMarkup(convertKeyBoard(boxAnswer.getKeyBoard())); sendMessage.setReplyMarkup(convertKeyBoard(boxAnswer.getKeyBoard()));
} }