2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Use Main::Session::uniqueId in notifications.

This commit is contained in:
John Preston
2020-06-24 13:05:56 +04:00
parent e38d39656d
commit d8a2b391a3
9 changed files with 110 additions and 108 deletions

View File

@@ -165,6 +165,14 @@ base::Observable<void> &Session::downloaderTaskFinished() {
return downloader().taskFinished();
}
uint64 Session::uniqueId() const {
auto result = uint64(uint32(userId()));
if (mtp().isTestMode()) {
result |= 0x0100'0000'0000'0000ULL;
}
return result;
}
UserId Session::userId() const {
return _user->bareId();
}