Early process received users and chats.
This commit is contained in:
parent
c3c14ee65e
commit
2a685bc9ab
@ -666,9 +666,6 @@ void StatisticsManager::on_get_public_forwards(
|
||||
Promise<td_api::object_ptr<td_api::publicForwards>> &&promise) {
|
||||
TRY_STATUS_PROMISE(promise, G()->close_status());
|
||||
|
||||
td_->contacts_manager_->on_get_users(std::move(public_forwards->users_), "on_get_public_forwards");
|
||||
td_->contacts_manager_->on_get_chats(std::move(public_forwards->chats_), "on_get_public_forwards");
|
||||
|
||||
auto total_count = public_forwards->count_;
|
||||
LOG(INFO) << "Receive " << public_forwards->forwards_.size() << " forwarded stories out of "
|
||||
<< public_forwards->count_;
|
||||
@ -719,6 +716,9 @@ void StatisticsManager::on_get_public_forwards(
|
||||
void StatisticsManager::get_channel_differences_if_needed(
|
||||
telegram_api::object_ptr<telegram_api::stats_publicForwards> &&public_forwards,
|
||||
Promise<td_api::object_ptr<td_api::publicForwards>> promise, const char *source) {
|
||||
td_->contacts_manager_->on_get_users(std::move(public_forwards->users_), "stats_publicForwards");
|
||||
td_->contacts_manager_->on_get_chats(std::move(public_forwards->chats_), "stats_publicForwards");
|
||||
|
||||
vector<const telegram_api::object_ptr<telegram_api::Message> *> messages;
|
||||
for (const auto &forward : public_forwards->forwards_) {
|
||||
CHECK(forward != nullptr);
|
||||
|
@ -2851,6 +2851,9 @@ bool StoryManager::has_unexpired_viewers(StoryFullId story_full_id, const Story
|
||||
void StoryManager::get_channel_differences_if_needed(
|
||||
telegram_api::object_ptr<telegram_api::stories_storyViewsList> &&story_views,
|
||||
Promise<telegram_api::object_ptr<telegram_api::stories_storyViewsList>> promise) {
|
||||
td_->contacts_manager_->on_get_users(std::move(story_views->users_), "stories_storyViewsList");
|
||||
td_->contacts_manager_->on_get_chats(std::move(story_views->chats_), "stories_storyViewsList");
|
||||
|
||||
vector<const telegram_api::object_ptr<telegram_api::Message> *> messages;
|
||||
for (const auto &view : story_views->views_) {
|
||||
CHECK(view != nullptr);
|
||||
@ -2917,9 +2920,6 @@ void StoryManager::on_get_story_interactions(
|
||||
return promise.set_value(td_api::make_object<td_api::storyInteractions>());
|
||||
}
|
||||
|
||||
td_->contacts_manager_->on_get_users(std::move(view_list->users_), "on_get_story_interactions");
|
||||
td_->contacts_manager_->on_get_chats(std::move(view_list->chats_), "on_get_story_interactions");
|
||||
|
||||
auto total_count = view_list->count_;
|
||||
if (total_count < 0 || static_cast<size_t>(total_count) < view_list->views_.size()) {
|
||||
LOG(ERROR) << "Receive total_count = " << total_count << " and " << view_list->views_.size() << " story viewers";
|
||||
@ -2955,6 +2955,9 @@ void StoryManager::on_get_story_interactions(
|
||||
void StoryManager::get_channel_differences_if_needed(
|
||||
telegram_api::object_ptr<telegram_api::stories_storyReactionsList> &&story_reactions,
|
||||
Promise<telegram_api::object_ptr<telegram_api::stories_storyReactionsList>> promise) {
|
||||
td_->contacts_manager_->on_get_users(std::move(story_reactions->users_), "stories_storyReactionsList");
|
||||
td_->contacts_manager_->on_get_chats(std::move(story_reactions->chats_), "stories_storyReactionsList");
|
||||
|
||||
vector<const telegram_api::object_ptr<telegram_api::Message> *> messages;
|
||||
for (const auto &reaction : story_reactions->reactions_) {
|
||||
CHECK(reaction != nullptr);
|
||||
@ -3013,9 +3016,6 @@ void StoryManager::on_get_dialog_story_interactions(
|
||||
return promise.set_value(td_api::make_object<td_api::storyInteractions>());
|
||||
}
|
||||
|
||||
td_->contacts_manager_->on_get_users(std::move(reaction_list->users_), "on_get_dialog_story_interactions");
|
||||
td_->contacts_manager_->on_get_chats(std::move(reaction_list->chats_), "on_get_dialog_story_interactions");
|
||||
|
||||
auto total_count = reaction_list->count_;
|
||||
if (total_count < 0 || static_cast<size_t>(total_count) < reaction_list->reactions_.size()) {
|
||||
LOG(ERROR) << "Receive total_count = " << total_count << " and " << reaction_list->reactions_.size()
|
||||
|
Loading…
Reference in New Issue
Block a user