2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-04 16:45:12 +00:00

Implement correct ForumTopic::canWrite logic.

This commit is contained in:
John Preston
2022-10-25 11:20:22 +04:00
parent 1cd02fc3c9
commit 602ba5bba9
35 changed files with 363 additions and 144 deletions

View File

@@ -937,11 +937,11 @@ Data::ForumTopic *PeerData::forumTopicFor(MsgId rootId) const {
}
bool PeerData::canWrite() const {
bool PeerData::canWrite(bool checkForForum) const {
if (const auto user = asUser()) {
return user->canWrite();
} else if (const auto channel = asChannel()) {
return channel->canWrite();
return channel->canWrite(checkForForum);
} else if (const auto chat = asChat()) {
return chat->canWrite();
}