2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Check test/production DC in recent emoji.

This commit is contained in:
John Preston
2022-07-15 20:56:25 +04:00
parent 323c2a6aa5
commit 240b47da86
6 changed files with 127 additions and 52 deletions

View File

@@ -258,10 +258,14 @@ rpl::producer<bool> Session::premiumPossibleValue() const {
_1 || _2);
}
bool Session::isTestMode() const {
return mtp().isTestMode();
}
uint64 Session::uniqueId() const {
// See also Account::willHaveSessionUniqueId.
return userId().bare
| (mtp().isTestMode() ? 0x0100'0000'0000'0000ULL : 0ULL);
| (isTestMode() ? 0x0100'0000'0000'0000ULL : 0ULL);
}
UserId Session::userId() const {