Log if expected web_page_url isn't found.
This commit is contained in:
parent
b0df339750
commit
4f6f976e50
@ -203,6 +203,9 @@ DraftMessage::DraftMessage(Td *td, telegram_api::object_ptr<telegram_api::draftM
|
||||
} else {
|
||||
auto media = telegram_api::move_object_as<telegram_api::inputMediaWebPage>(draft_message->media_);
|
||||
web_page_url = std::move(media->url_);
|
||||
if (web_page_url.empty()) {
|
||||
LOG(ERROR) << "Have no URL in a draft with manual link preview";
|
||||
}
|
||||
force_small_media = media->force_small_media_;
|
||||
force_large_media = media->force_large_media_;
|
||||
}
|
||||
|
@ -5316,6 +5316,9 @@ unique_ptr<MessageContent> get_message_content(Td *td, FormattedText message,
|
||||
string web_page_url;
|
||||
if (media->manual_) {
|
||||
web_page_url = WebPagesManager::get_web_page_url(media->webpage_);
|
||||
if (web_page_url.empty()) {
|
||||
LOG(ERROR) << "Have no URL in manual link preview";
|
||||
}
|
||||
}
|
||||
auto web_page_id = td->web_pages_manager_->on_get_web_page(std::move(media->webpage_), owner_dialog_id);
|
||||
return td::make_unique<MessageText>(std::move(message), web_page_id, media->force_small_media_,
|
||||
|
Loading…
Reference in New Issue
Block a user