Add td_api::canSendStoryResultBoostNeeded.

This commit is contained in:
levlam 2023-09-14 20:04:59 +03:00
parent c120b5ef19
commit e2462e2487
2 changed files with 6 additions and 0 deletions

View File

@ -4458,6 +4458,9 @@ canSendStoryResultOk = CanSendStoryResult;
//@description The user must subscribe to Telegram Premium to be able to post stories
canSendStoryResultPremiumNeeded = CanSendStoryResult;
//@description The channel chat must be boosted first by Telegram Premium subscribers to post more stories. Call getChatBoostStatus to get current boost status of the chat
canSendStoryResultBoostNeeded = CanSendStoryResult;
//@description The limit for the number of active stories exceeded. The user can buy Telegram Premium, delete an active story, or wait for the oldest story to expire
canSendStoryResultActiveStoryLimitExceeded = CanSendStoryResult;

View File

@ -62,6 +62,9 @@ static td_api::object_ptr<td_api::CanSendStoryResult> get_can_send_story_result_
if (error.message() == "PREMIUM_ACCOUNT_REQUIRED") {
return td_api::make_object<td_api::canSendStoryResultPremiumNeeded>();
}
if (error.message() == "BOOSTS_REQUIRED") {
return td_api::make_object<td_api::canSendStoryResultBoostNeeded>();
}
if (error.message() == "STORIES_TOO_MUCH") {
return td_api::make_object<td_api::canSendStoryResultActiveStoryLimitExceeded>();
}