mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Pass FullReplyTo everywhere.
This commit is contained in:
@@ -169,9 +169,7 @@ void SendBotCallbackData(
|
||||
void HideSingleUseKeyboard(
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<HistoryItem*> item) {
|
||||
controller->content()->hideSingleUseKeyboard(
|
||||
item->history()->peer,
|
||||
item->id);
|
||||
controller->content()->hideSingleUseKeyboard(item->fullId());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -312,7 +310,9 @@ void ActivateBotCommand(ClickHandlerContext context, int row, int column) {
|
||||
case ButtonType::Default: {
|
||||
// Copy string before passing it to the sending method
|
||||
// because the original button can be destroyed inside.
|
||||
const auto replyTo = item->isRegular() ? item->id : 0;
|
||||
const auto replyTo = item->isRegular()
|
||||
? item->fullId()
|
||||
: FullMsgId();
|
||||
controller->content()->sendBotCommand({
|
||||
.peer = item->history()->peer,
|
||||
.command = QString(button->text),
|
||||
@@ -363,7 +363,7 @@ void ActivateBotCommand(ClickHandlerContext context, int row, int column) {
|
||||
|
||||
case ButtonType::RequestPhone: {
|
||||
HideSingleUseKeyboard(controller, item);
|
||||
const auto itemId = item->id;
|
||||
const auto itemId = item->fullId();
|
||||
const auto topicRootId = item->topicRootId();
|
||||
const auto history = item->history();
|
||||
controller->show(Ui::MakeConfirmBox({
|
||||
@@ -376,7 +376,7 @@ void ActivateBotCommand(ClickHandlerContext context, int row, int column) {
|
||||
auto action = Api::SendAction(history);
|
||||
action.clearDraft = false;
|
||||
action.replyTo = {
|
||||
.msgId = itemId,
|
||||
.messageId = itemId,
|
||||
.topicRootId = topicRootId,
|
||||
};
|
||||
history->session().api().shareContact(
|
||||
@@ -397,13 +397,11 @@ void ActivateBotCommand(ClickHandlerContext context, int row, int column) {
|
||||
chosen |= PollData::Flag::Quiz;
|
||||
}
|
||||
}
|
||||
const auto replyToId = MsgId(0);
|
||||
const auto topicRootId = MsgId(0);
|
||||
const auto replyTo = FullReplyTo();
|
||||
Window::PeerMenuCreatePoll(
|
||||
controller,
|
||||
item->history()->peer,
|
||||
replyToId,
|
||||
topicRootId,
|
||||
replyTo,
|
||||
chosen,
|
||||
disabled);
|
||||
} break;
|
||||
|
||||
Reference in New Issue
Block a user