mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Update API scheme on layer 206.
This commit is contained in:
@@ -2245,7 +2245,7 @@ void MessageReactions::scheduleSendPaid(
|
||||
_paid->scheduledPrivacySet = true;
|
||||
}
|
||||
if (count > 0) {
|
||||
_item->history()->session().credits().lock(StarsAmount(count));
|
||||
_item->history()->session().credits().lock(CreditsAmount(count));
|
||||
}
|
||||
_item->history()->owner().reactions().schedulePaid(_item);
|
||||
}
|
||||
@@ -2259,7 +2259,7 @@ void MessageReactions::cancelScheduledPaid() {
|
||||
if (_paid->scheduledFlag) {
|
||||
if (const auto amount = int(_paid->scheduled)) {
|
||||
_item->history()->session().credits().unlock(
|
||||
StarsAmount(amount));
|
||||
CreditsAmount(amount));
|
||||
}
|
||||
_paid->scheduled = 0;
|
||||
_paid->scheduledFlag = 0;
|
||||
@@ -2322,9 +2322,9 @@ void MessageReactions::finishPaidSending(
|
||||
if (const auto amount = send.count) {
|
||||
const auto credits = &_item->history()->session().credits();
|
||||
if (success) {
|
||||
credits->withdrawLocked(StarsAmount(amount));
|
||||
credits->withdrawLocked(CreditsAmount(amount));
|
||||
} else {
|
||||
credits->unlock(StarsAmount(amount));
|
||||
credits->unlock(CreditsAmount(amount));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user