Support updateOwnedStarCount in getCurrentState.

This commit is contained in:
levlam 2024-08-07 13:08:09 +03:00
parent 9daa9a0717
commit ec92603a70
3 changed files with 10 additions and 0 deletions

View File

@ -861,4 +861,10 @@ int32 StarManager::get_months_by_star_count(int64 star_count) {
return star_count <= 1000 ? 3 : (star_count < 2500 ? 6 : 12);
}
void StarManager::get_current_state(vector<td_api::object_ptr<td_api::Update>> &updates) const {
if (owned_star_count_ < (1ll << 62)) {
updates.push_back(get_update_owned_star_count_object());
}
}
} // namespace td

View File

@ -66,6 +66,8 @@ class StarManager final : public Actor {
static int32 get_months_by_star_count(int64 star_count);
void get_current_state(vector<td_api::object_ptr<td_api::Update>> &updates) const;
private:
void tear_down() final;

View File

@ -3719,6 +3719,8 @@ void Td::on_request(uint64 id, const td_api::getCurrentState &request) {
terms_of_service_manager_->get_current_state(updates);
star_manager_->get_current_state(updates);
// TODO updateFileGenerationStart generation_id:int64 original_path:string destination_path:string conversion:string = Update;
// TODO updateCall call:call = Update;
// TODO updateGroupCall call:groupCall = Update;