Support updateChatOnlineMemberCount in getCurrentState.

GitOrigin-RevId: f529c293fd92d188eaca5daef33d25d7ef7a13aa
This commit is contained in:
levlam 2019-03-14 22:59:07 +03:00
parent b29b0fa6cc
commit 28fde94d49

View File

@ -25504,6 +25504,14 @@ void MessagesManager::get_current_state(vector<td_api::object_ptr<td_api::Update
dialog_date <= last_dialog_date_ ? d->order : 0)); dialog_date <= last_dialog_date_ ? d->order : 0));
} }
updates.push_back(std::move(update)); updates.push_back(std::move(update));
if (d->is_opened) {
auto info_it = dialog_online_member_counts_.find(d->dialog_id);
if (info_it != dialog_online_member_counts_.end() && info_it->second.is_update_sent) {
updates.push_back(td_api::make_object<td_api::updateChatOnlineMemberCount>(
d->dialog_id.get(), info_it->second.online_member_count));
}
}
} }
append(updates, std::move(last_message_updates)); append(updates, std::move(last_message_updates));
} }