Поправил заполнение SentBox при replace
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Struchkov Mark 2023-04-01 21:46:15 +03:00
parent ee2024d37f
commit e960c273a0
Signed by: upagge
GPG Key ID: D3018BE7BA428CA6
3 changed files with 3 additions and 7 deletions

View File

@ -8,7 +8,7 @@ public final class BoxAnswerPayload {
public static final ContextKey<Boolean> DISABLE_WEB_PAGE_PREVIEW = ContextKey.of("DISABLE_WEB_PAGE_PREVIEW", Boolean.class);
public static final ContextKey<Boolean> DISABLE_NOTIFICATION = ContextKey.of("DISABLE_NOTIFICATION", Boolean.class);
public static final ContextKey<Boolean> ENABLE_MARKDOWN = ContextKey.of("DISABLE_MARKDOWN", Boolean.class);
public static final ContextKey<Boolean> ENABLE_MARKDOWN = ContextKey.of("ENABLE_MARKDOWN", Boolean.class);
public static final ContextKey<SendInvoice> INVOICE = ContextKey.of("INVOICE", SendInvoice.class);
private BoxAnswerPayload() {

View File

@ -11,11 +11,6 @@ import org.telegram.telegrambots.meta.bots.AbsSender;
import static dev.struchkov.haiti.utils.Checker.checkNotNull;
/**
* TODO: Добавить описание класса.
*
* @author upagge [15/07/2019]
*/
public class TelegramPollingBot extends TelegramLongPollingBot implements TelegramBot {
private final TelegramBotConfig telegramBotConfig;

View File

@ -182,9 +182,10 @@ public class TelegramSender implements TelegramSending {
return Uni.createFrom().completionStage(executeAsync(editMessageText))
.onItem().ifNotNull().transform(t -> {
final SentBox sentBox = new SentBox();
sentBox.setPersonId(telegramId);
sentBox.setMessageId(lastMessageId);
sentBox.setSentAnswer(boxAnswer);
sentBox.setOriginalAnswer(boxAnswer);
sentBox.setMessageId(telegramId);
return sentBox;
})
.onFailure(TelegramApiRequestException.class).recoverWithUni(