2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +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

@@ -795,6 +795,13 @@ QString PeerData::userName() const {
return QString();
}
bool PeerData::isSelf() const {
if (const auto user = asUser()) {
return (user->flags() & UserDataFlag::Self);
}
return false;
}
bool PeerData::isVerified() const {
if (const auto user = asUser()) {
return user->isVerified();