2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-03 07:56:03 +00:00

Allow enabling direct messages in channels.

This commit is contained in:
John Preston
2025-05-06 17:48:18 +04:00
parent 23eedb468f
commit d3f9a84a0a
39 changed files with 685 additions and 242 deletions

View File

@@ -1333,6 +1333,13 @@ bool PeerData::isForum() const {
return false;
}
bool PeerData::isMonoforum() const {
if (const auto channel = asChannel()) {
return channel->isMonoforum();
}
return false;
}
bool PeerData::isGigagroup() const {
if (const auto channel = asChannel()) {
return channel->isGigagroup();
@@ -1416,6 +1423,13 @@ Data::ForumTopic *PeerData::forumTopicFor(MsgId rootId) const {
return nullptr;
}
Data::SavedMessages *PeerData::monoforum() const {
if (const auto channel = asChannel()) {
return channel->monoforum();
}
return nullptr;
}
bool PeerData::allowsForwarding() const {
if (isUser()) {
return true;