2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Update API scheme to layer 148, start forums.

This commit is contained in:
John Preston
2022-09-20 13:35:47 +04:00
parent 87b228b256
commit c88140e256
25 changed files with 349 additions and 40 deletions

View File

@@ -844,15 +844,31 @@ bool PeerData::isFake() const {
}
bool PeerData::isMegagroup() const {
return isChannel() && asChannel()->isMegagroup();
if (const auto channel = asChannel()) {
return channel->isMegagroup();
}
return false;
}
bool PeerData::isBroadcast() const {
return isChannel() && asChannel()->isBroadcast();
if (const auto channel = asChannel()) {
return channel->isBroadcast();
}
return false;
}
bool PeerData::isForum() const {
if (const auto channel = asChannel()) {
return channel->isForum();
}
return false;
}
bool PeerData::isGigagroup() const {
return isChannel() && asChannel()->isGigagroup();
if (const auto channel = asChannel()) {
return channel->isGigagroup();
}
return false;
}
bool PeerData::isRepliesChat() const {