Remove WebPagesManager::get_secret_input_media.
This commit is contained in:
parent
4f6f976e50
commit
6917503e5e
@ -2715,7 +2715,12 @@ SecretInputMedia get_secret_input_media(const MessageContent *content, Td *td,
|
||||
CHECK(input_file == nullptr);
|
||||
CHECK(thumbnail.empty());
|
||||
const auto *m = static_cast<const MessageText *>(content);
|
||||
return td->web_pages_manager_->get_secret_input_media(m->web_page_id);
|
||||
auto web_page_url =
|
||||
!m->web_page_url.empty() ? m->web_page_url : td->web_pages_manager_->get_web_page_url(m->web_page_id);
|
||||
if (web_page_url.empty()) {
|
||||
return SecretInputMedia{};
|
||||
}
|
||||
return SecretInputMedia{nullptr, make_tl_object<secret_api::decryptedMessageMediaWebPage>(web_page_url)};
|
||||
}
|
||||
case MessageContentType::Venue: {
|
||||
const auto *m = static_cast<const MessageVenue *>(content);
|
||||
|
@ -1223,18 +1223,6 @@ void WebPagesManager::reload_web_page_by_url(const string &url, Promise<WebPageI
|
||||
td_->create_handler<GetWebPageQuery>(std::move(promise))->send(WebPageId(), url, 0);
|
||||
}
|
||||
|
||||
SecretInputMedia WebPagesManager::get_secret_input_media(WebPageId web_page_id) const {
|
||||
if (!web_page_id.is_valid()) {
|
||||
return SecretInputMedia{};
|
||||
}
|
||||
|
||||
const WebPage *web_page = get_web_page(web_page_id);
|
||||
if (web_page == nullptr) {
|
||||
return SecretInputMedia{};
|
||||
}
|
||||
return SecretInputMedia{nullptr, make_tl_object<secret_api::decryptedMessageMediaWebPage>(web_page->url_)};
|
||||
}
|
||||
|
||||
bool WebPagesManager::have_web_page(WebPageId web_page_id) const {
|
||||
if (!web_page_id.is_valid()) {
|
||||
return false;
|
||||
|
@ -83,8 +83,6 @@ class WebPagesManager final : public Actor {
|
||||
void on_get_web_page_preview(const string &first_url, tl_object_ptr<telegram_api::MessageMedia> &&message_media_ptr,
|
||||
Promise<td_api::object_ptr<td_api::webPage>> &&promise);
|
||||
|
||||
SecretInputMedia get_secret_input_media(WebPageId web_page_id) const;
|
||||
|
||||
void on_binlog_web_page_event(BinlogEvent &&event);
|
||||
|
||||
FileSourceId get_url_file_source_id(const string &url);
|
||||
|
Loading…
Reference in New Issue
Block a user