Fix null caption handling.

GitOrigin-RevId: 54c7067b9b38fe77090a089423c88aabe0969712
This commit is contained in:
levlam 2018-01-31 17:45:49 +03:00
parent aa3f1eac49
commit 533990288b

View File

@ -13772,7 +13772,7 @@ Result<FormattedText> MessagesManager::process_input_caption(DialogId dialog_id,
tl_object_ptr<td_api::formattedText> &&text,
bool is_bot) const {
if (text == nullptr) {
return {};
return FormattedText{};
}
TRY_RESULT(entities, get_message_entities(td_->contacts_manager_.get(), std::move(text->entities_)));
TRY_STATUS(fix_text_message(text->text_, entities, true, false, need_skip_bot_commands(dialog_id, is_bot), false));