mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-03 21:32:16 +00:00
Fixed crash in inline results of file type with text message send data.
This commit is contained in:
parent
1859b83e8d
commit
0a96f633d5
@ -135,6 +135,11 @@ std_::unique_ptr<Result> Result::create(uint64 queryId, const MTPBotInlineResult
|
||||
const auto &r(message->c_botInlineMessageText());
|
||||
EntitiesInText entities = r.has_entities() ? entitiesFromMTP(r.ventities.c_vector().v) : EntitiesInText();
|
||||
result->sendData.reset(new internal::SendText(qs(r.vmessage), entities, r.is_no_webpage()));
|
||||
if (result->_type == Type::Photo) {
|
||||
result->createPhoto();
|
||||
} else if (result->_type == Type::Audio || result->_type == Type::File || result->_type == Type::Video || result->_type == Type::Sticker || result->_type == Type::Gif) {
|
||||
result->createDocument();
|
||||
}
|
||||
if (r.has_reply_markup()) {
|
||||
result->_mtpKeyboard = std_::make_unique<MTPReplyMarkup>(r.vreply_markup);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user