2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Update API scheme to layer 190.

Support adding messages to gifts of Premium subscriptions.
This commit is contained in:
John Preston
2024-10-02 14:56:28 +04:00
parent b3dddc1dfe
commit db475ef0b4
4 changed files with 34 additions and 21 deletions

View File

@@ -1083,19 +1083,7 @@ void SendGiftBox(
};
button->setClickedCallback([=] {
const auto star = std::get_if<GiftTypeStars>(&descriptor);
if (v::is<GiftTypePremium>(descriptor)) {
if (state->sending) {
return;
} else {
state->sending = true;
}
SendGift(
window,
peer,
api,
GiftDetails{ descriptor },
premiumSent);
} else if (star && star->limitedCount && !star->limitedLeft) {
if (star && star->limitedCount && !star->limitedLeft) {
window->showToast({
.title = tr::lng_gift_sold_out_title(tr::now),
.text = tr::lng_gift_sold_out_text(