2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Auto-submit /start when paying for premium.

This commit is contained in:
John Preston
2022-05-23 15:45:22 +04:00
parent 1eccb34f86
commit ff030d0252
4 changed files with 10 additions and 2 deletions

View File

@@ -598,7 +598,12 @@ void StartPremiumPayment(
"premium_invoice_slug",
QString());
if (!username.isEmpty()) {
UrlClickHandler::Open("https://t.me/" + username + "?start=" + ref);
controller->showPeerByLink(Window::SessionNavigation::PeerByLinkInfo{
.usernameOrId = username,
.resolveType = Window::ResolveType::BotStart,
.startToken = ref,
.startAutoSubmit = true,
});
} else if (!slug.isEmpty()) {
UrlClickHandler::Open("https://t.me/$" + slug);
}