mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-26 19:14:02 +02:00
Fixed crash in inline results of file type with text message send data.
This commit is contained in:
parent
1859b83e8d
commit
0a96f633d5
1 changed files with 5 additions and 0 deletions
|
@ -135,6 +135,11 @@ std_::unique_ptr<Result> Result::create(uint64 queryId, const MTPBotInlineResult
|
||||||
const auto &r(message->c_botInlineMessageText());
|
const auto &r(message->c_botInlineMessageText());
|
||||||
EntitiesInText entities = r.has_entities() ? entitiesFromMTP(r.ventities.c_vector().v) : EntitiesInText();
|
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()));
|
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()) {
|
if (r.has_reply_markup()) {
|
||||||
result->_mtpKeyboard = std_::make_unique<MTPReplyMarkup>(r.vreply_markup);
|
result->_mtpKeyboard = std_::make_unique<MTPReplyMarkup>(r.vreply_markup);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue