fix to_abstract_post methods' names

This commit is contained in:
Slavasil 2025-01-05 02:58:35 +03:00
parent 91bce904ac
commit db561e0c90

View File

@ -461,11 +461,11 @@ bool RepostManager::drop_posts_older_than(std::vector<AbstractPost> &posts, long
} }
} }
std::optional<AbstractPost> to_abstract_post(const vk::Post &post, int sourceIndex) { std::optional<AbstractPost> RepostManager::to_abstract_post(const vk::Post &post, int sourceIndex) {
return { AbstractPost(posts::SRC_VK, sourceIndex, post.id, post.date, post.text) }; return { AbstractPost(posts::SRC_VK, sourceIndex, post.id, post.date, post.text) };
} }
std::optional<AbstractPost> to_abstract_post(const td_api::message &post, int sourceIndex) { std::optional<AbstractPost> RepostManager::to_abstract_post(const td_api::message &post, int sourceIndex) {
if (post.content_->get_id() == td_api::messageText::ID) { if (post.content_->get_id() == td_api::messageText::ID) {
auto &content = (td_api::messageText&) *post.content_; auto &content = (td_api::messageText&) *post.content_;
return { AbstractPost(posts::SRC_TELEGRAM, sourceIndex, post.id_, post.date_, content.text_->text_) }; return { AbstractPost(posts::SRC_TELEGRAM, sourceIndex, post.id_, post.date_, content.text_->text_) };