mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 15:35:51 +00:00
Removed unused refund api support for credits.
This commit is contained in:
@@ -199,24 +199,4 @@ rpl::producer<not_null<PeerData*>> PremiumPeerBot(
|
||||
};
|
||||
}
|
||||
|
||||
void CreditsRefund(
|
||||
not_null<PeerData*> peer,
|
||||
const QString &entryId,
|
||||
Fn<void()> done,
|
||||
Fn<void(QString)> fail) {
|
||||
const auto user = peer->asUser();
|
||||
if (!user) {
|
||||
return;
|
||||
}
|
||||
peer->session().api().request(MTPpayments_RefundStarsCharge(
|
||||
user->inputUser,
|
||||
MTP_string(entryId)
|
||||
)).done([=](const MTPUpdates &result) {
|
||||
peer->session().api().updates().applyUpdates(result);
|
||||
done();
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
fail(error.type());
|
||||
}).send();
|
||||
}
|
||||
|
||||
} // namespace Api
|
||||
|
@@ -68,12 +68,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
void CreditsRefund(
|
||||
not_null<PeerData*> peer,
|
||||
const QString &entryId,
|
||||
Fn<void()> done,
|
||||
Fn<void(QString)> fail);
|
||||
|
||||
[[nodiscard]] rpl::producer<not_null<PeerData*>> PremiumPeerBot(
|
||||
not_null<Main::Session*> session);
|
||||
|
||||
|
Reference in New Issue
Block a user