2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 15:35:51 +00:00

Create / move forum topics on new messages.

This commit is contained in:
John Preston
2022-09-23 23:21:31 +04:00
parent 388fe6adfb
commit eaf679916a
19 changed files with 155 additions and 58 deletions

View File

@@ -882,6 +882,13 @@ bool PeerData::isRepliesChat() const {
: kTestId) == id;
}
Data::Forum *PeerData::forum() const {
if (const auto channel = asChannel()) {
return channel->forum();
}
return nullptr;
}
bool PeerData::canWrite() const {
if (const auto user = asUser()) {
return user->canWrite();