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

Don't use MTP for PeerData::isSelf.

This commit is contained in:
John Preston
2021-12-01 18:51:18 +04:00
parent 8592326a3c
commit afcebb136c
6 changed files with 31 additions and 15 deletions

View File

@@ -78,6 +78,7 @@ Session::Session(
, _uploader(std::make_unique<Storage::Uploader>(_api.get()))
, _storage(std::make_unique<Storage::Facade>())
, _data(std::make_unique<Data::Session>(this))
, _userId(user.c_user().vid())
, _user(_data->processUser(user))
, _emojiStickersPack(std::make_unique<Stickers::EmojiPack>(this))
, _diceStickersPacks(std::make_unique<Stickers::DicePacks>(this))
@@ -213,11 +214,11 @@ uint64 Session::uniqueId() const {
}
UserId Session::userId() const {
return peerToUser(_user->id);
return _userId;
}
PeerId Session::userPeerId() const {
return _user->id;
return _userId;
}
bool Session::validateSelf(UserId id) {