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

Allow enabling forum, creating topics.

This commit is contained in:
John Preston
2022-09-20 22:12:30 +04:00
parent c88140e256
commit 388fe6adfb
21 changed files with 781 additions and 49 deletions

View File

@@ -805,7 +805,12 @@ not_null<PeerData*> Session::processChat(const MTPChat &data) {
| ((data.is_forum() && data.is_megagroup())
? Flag::Forum
: Flag());
const auto wasForum = channel->isForum();
channel->setFlags((channel->flags() & ~flagsMask) | flagsSet);
if (const auto nowForum = channel->isForum(); nowForum != wasForum) {
Assert(channel->mgInfo != nullptr);
channel->mgInfo->setIsForum(channel, nowForum);
}
channel->setName(
qs(data.vtitle()),