Monoforums

This commit is contained in:
Isaac
2025-05-24 00:05:48 +08:00
parent 3910ecdca2
commit 2a3e3ad4ba
5 changed files with 26 additions and 4 deletions

View File

@@ -810,9 +810,16 @@ extension ChatControllerImpl {
contactStatus = ChatContactStatus(canAddContact: false, peerStatusSettings: cachedData.peerStatusSettings, invitedBy: invitedBy, managingBot: managingBot)
if let channel = peerView.peers[peerView.peerId] as? TelegramChannel {
if channel.flags.contains(.isCreator) || channel.adminRights != nil {
if channel.isMonoForum {
if let linkedMonoforumId = channel.linkedMonoforumId, let mainChannel = peerView.peers[linkedMonoforumId] as? TelegramChannel, mainChannel.hasPermission(.sendSomething) {
} else {
sendPaidMessageStars = channel.sendPaidMessageStars
}
} else {
sendPaidMessageStars = channel.sendPaidMessageStars
if channel.flags.contains(.isCreator) || channel.adminRights != nil {
} else {
sendPaidMessageStars = channel.sendPaidMessageStars
}
}
}
}