mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Auto-submit /start when paying for premium.
This commit is contained in:
parent
1eccb34f86
commit
ff030d0252
4 changed files with 10 additions and 2 deletions
|
@ -1686,7 +1686,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_premium_summary_about_animated_userpics" = "Video avatars animated in chat lists and chats to allow for additional self-expression.";
|
"lng_premium_summary_about_animated_userpics" = "Video avatars animated in chat lists and chats to allow for additional self-expression.";
|
||||||
"lng_premium_summary_bottom_subtitle" = "About Telegram Premium";
|
"lng_premium_summary_bottom_subtitle" = "About Telegram Premium";
|
||||||
"lng_premium_summary_bottom_about" = "While the free version of Telegram already gives its users more than any other messaging application, **Telegram Premium** pushes its capabilities even further.\n\n**Telegram Premium** is a paid option, because most Premium Features require additional expenses from Telegram to third parties such as data center providers and server manufacturers. Contributions from **Telegram Premium** users allow us to cover such costs and also help Telegram stay free for everyone.";
|
"lng_premium_summary_bottom_about" = "While the free version of Telegram already gives its users more than any other messaging application, **Telegram Premium** pushes its capabilities even further.\n\n**Telegram Premium** is a paid option, because most Premium Features require additional expenses from Telegram to third parties such as data center providers and server manufacturers. Contributions from **Telegram Premium** users allow us to cover such costs and also help Telegram stay free for everyone.";
|
||||||
"lng_premium_summary_button" = "Subscribe for {cost} per month.";
|
"lng_premium_summary_button" = "Subscribe for {cost} per month";
|
||||||
|
|
||||||
"lng_group_about_header" = "You have created a group.";
|
"lng_group_about_header" = "You have created a group.";
|
||||||
"lng_group_about_text" = "Groups can have:";
|
"lng_group_about_text" = "Groups can have:";
|
||||||
|
|
|
@ -598,7 +598,12 @@ void StartPremiumPayment(
|
||||||
"premium_invoice_slug",
|
"premium_invoice_slug",
|
||||||
QString());
|
QString());
|
||||||
if (!username.isEmpty()) {
|
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()) {
|
} else if (!slug.isEmpty()) {
|
||||||
UrlClickHandler::Open("https://t.me/$" + slug);
|
UrlClickHandler::Open("https://t.me/$" + slug);
|
||||||
}
|
}
|
||||||
|
|
|
@ -346,6 +346,8 @@ void SessionNavigation::showPeerByLinkResolved(
|
||||||
// Show specific posts only in channels / supergroups.
|
// Show specific posts only in channels / supergroups.
|
||||||
const auto msgId = peer->isChannel()
|
const auto msgId = peer->isChannel()
|
||||||
? info.messageId
|
? info.messageId
|
||||||
|
: info.startAutoSubmit
|
||||||
|
? ShowAndStartBotMsgId
|
||||||
: ShowAtUnreadMsgId;
|
: ShowAtUnreadMsgId;
|
||||||
const auto attachBotUsername = info.attachBotUsername;
|
const auto attachBotUsername = info.attachBotUsername;
|
||||||
if (bot && bot->botInfo->startToken != info.startToken) {
|
if (bot && bot->botInfo->startToken != info.startToken) {
|
||||||
|
|
|
@ -193,6 +193,7 @@ public:
|
||||||
ResolveType resolveType = ResolveType::Default;
|
ResolveType resolveType = ResolveType::Default;
|
||||||
QString startToken;
|
QString startToken;
|
||||||
ChatAdminRights startAdminRights;
|
ChatAdminRights startAdminRights;
|
||||||
|
bool startAutoSubmit = false;
|
||||||
QString attachBotUsername;
|
QString attachBotUsername;
|
||||||
std::optional<QString> attachBotToggleCommand;
|
std::optional<QString> attachBotToggleCommand;
|
||||||
std::optional<QString> voicechatHash;
|
std::optional<QString> voicechatHash;
|
||||||
|
|
Loading…
Add table
Reference in a new issue