Support via_bot_user_id in sendQuickReplyShortcutMessages.

This commit is contained in:
levlam 2024-03-18 22:38:30 +03:00
parent dd69dcdfe3
commit b28e1d2fd8
3 changed files with 5 additions and 2 deletions

View File

@ -26786,6 +26786,7 @@ Result<td_api::object_ptr<td_api::messages>> MessagesManager::send_quick_reply_s
Message *m = get_message_to_send(d, MessageId(), std::move(input_reply_to), message_send_options, Message *m = get_message_to_send(d, MessageId(), std::move(input_reply_to), message_send_options,
std::move(content.content_), content.invert_media_, &need_update_dialog_pos, false, std::move(content.content_), content.invert_media_, &need_update_dialog_pos, false,
nullptr, DialogId(), true); nullptr, DialogId(), true);
m->via_bot_user_id = content.via_bot_user_id_;
m->reply_markup = std::move(content.reply_markup_); m->reply_markup = std::move(content.reply_markup_);
m->disable_web_page_preview = content.disable_web_page_preview_; m->disable_web_page_preview = content.disable_web_page_preview_;
m->media_album_id = content.media_album_id_; m->media_album_id = content.media_album_id_;

View File

@ -1435,8 +1435,9 @@ Result<vector<QuickReplyManager::QuickReplyMessageContent>> QuickReplyManager::g
content->get_type() == MessageContentType::Text && content->get_type() == MessageContentType::Text &&
!has_message_content_web_page(content.get()); !has_message_content_web_page(content.get());
result.push_back({std::move(content), message->message_id, message->reply_to_message_id, result.push_back({std::move(content), message->message_id, message->reply_to_message_id,
dup_reply_markup(message->reply_markup), message->media_album_id, message->invert_media, dup_reply_markup(message->reply_markup),
disable_web_page_preview}); message->hide_via_bot ? UserId() : message->via_bot_user_id, message->media_album_id,
message->invert_media, disable_web_page_preview});
} }
return std::move(result); return std::move(result);

View File

@ -68,6 +68,7 @@ class QuickReplyManager final : public Actor {
MessageId original_message_id_; MessageId original_message_id_;
MessageId original_reply_to_message_id_; MessageId original_reply_to_message_id_;
unique_ptr<ReplyMarkup> reply_markup_; unique_ptr<ReplyMarkup> reply_markup_;
UserId via_bot_user_id_;
int64 media_album_id_; int64 media_album_id_;
bool invert_media_; bool invert_media_;
bool disable_web_page_preview_; bool disable_web_page_preview_;