| 728 | } |
| 729 | |
| 730 | bool PeerData::canCreateTopics() const { |
| 731 | if (const auto bot = asBot()) { |
| 732 | return bot->isForum(); |
| 733 | } else if (const auto channel = asChannel()) { |
| 734 | return channel->isForum() |
| 735 | && !channel->amRestricted(ChatRestriction::CreateTopics); |
| 736 | } |
| 737 | return false; |
| 738 | } |
| 739 | |
| 740 | bool PeerData::canManageTopics() const { |
| 741 | if (const auto bot = asBot()) { |
no test coverage detected