mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-03 16:05:57 +00:00
Support topic closing.
This commit is contained in:
@@ -534,6 +534,15 @@ bool PeerData::canCreateTopics() const {
|
||||
return isForum() && canPinMessages();
|
||||
}
|
||||
|
||||
bool PeerData::canEditTopics() const {
|
||||
if (const auto channel = asChannel()) {
|
||||
return channel->isForum()
|
||||
&& (channel->amCreator()
|
||||
|| (channel->adminRights() & ChatAdminRight::PinMessages));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool PeerData::canEditMessagesIndefinitely() const {
|
||||
if (const auto user = asUser()) {
|
||||
return user->isSelf();
|
||||
|
Reference in New Issue
Block a user