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

Add support for FAKE badge.

This commit is contained in:
John Preston
2021-01-21 16:39:40 +04:00
parent 1774b21e88
commit 58733ba6ea
13 changed files with 136 additions and 94 deletions

View File

@@ -747,6 +747,15 @@ bool PeerData::isScam() const {
return false;
}
bool PeerData::isFake() const {
if (const auto user = asUser()) {
return user->isFake();
} else if (const auto channel = asChannel()) {
return channel->isFake();
}
return false;
}
bool PeerData::isMegagroup() const {
return isChannel() ? asChannel()->isMegagroup() : false;
}