Add starSubscriptions.required_star_count.

This commit is contained in:
levlam 2024-08-05 10:21:22 +03:00
parent a4b557ea05
commit 176700325e
2 changed files with 5 additions and 4 deletions

View File

@ -816,8 +816,9 @@ starSubscription id:string chat_id:int53 expiration_date:int32 can_reuse:Bool is
//@description Represents a list of Telegram Star subscriptions
//@star_count The amount of owned Telegram Stars
//@subscriptions List of subbscriptions for Telegram Stars
//@required_star_count The number of Telegram Stars required to buy to prolongate subscriptions expiring soon
//@next_offset The offset for the next request. If empty, then there are no more results
starSubscriptions star_count:int53 subscriptions:vector<starSubscription> next_offset:string = StarSubscriptions;
starSubscriptions star_count:int53 subscriptions:vector<starSubscription> required_star_count:int53 next_offset:string = StarSubscriptions;
//@description Contains information about a product that can be paid with invoice

View File

@ -418,9 +418,9 @@ class GetStarsSubscriptionsQuery final : public Td::ResultHandler {
subscriptions.push_back(star_subscription.get_star_subscription_object(td_));
}
}
promise_.set_value(
td_api::make_object<td_api::starSubscriptions>(StarManager::get_star_count(result->balance_, true),
std::move(subscriptions), result->subscriptions_next_offset_));
promise_.set_value(td_api::make_object<td_api::starSubscriptions>(
StarManager::get_star_count(result->balance_, true), std::move(subscriptions),
StarManager::get_star_count(result->subscriptions_missing_balance_), result->subscriptions_next_offset_));
}
void on_error(Status status) final {