2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Support non-premium-supported limit boxes.

This commit is contained in:
John Preston
2022-06-07 09:48:33 +04:00
parent 1572af3a71
commit 368a1e4231
6 changed files with 85 additions and 45 deletions

View File

@@ -14,6 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "main/main_account.h"
#include "main/main_domain.h"
#include "main/main_session_settings.h"
#include "main/main_app_config.h"
#include "main/session/send_as_peers.h"
#include "mtproto/mtproto_config.h"
#include "chat_helpers/stickers_emoji_pack.h"
@@ -222,6 +223,12 @@ bool Session::premium() const {
return _user->isPremium();
}
bool Session::premiumPossible() const {
return !_account->appConfig().get<bool>(
"premium_purchase_blocked",
false);
}
uint64 Session::uniqueId() const {
// See also Account::willHaveSessionUniqueId.
return userId().bare