mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Permission management updates
This commit is contained in:
@@ -99,7 +99,7 @@ func inputPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceState
|
||||
break
|
||||
}
|
||||
} else if let channel = peer as? TelegramChannel {
|
||||
if let bannedRights = channel.bannedRights, bannedRights.flags.contains(.banSendMessages) {
|
||||
if channel.hasBannedPermission(.banSendMessages) != nil {
|
||||
if let currentPanel = currentPanel as? ChatRestrictedInputPanelNode {
|
||||
return currentPanel
|
||||
} else {
|
||||
@@ -164,6 +164,17 @@ func inputPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceState
|
||||
case .Member:
|
||||
break
|
||||
}
|
||||
|
||||
if group.hasBannedPermission(.banSendMessages) {
|
||||
if let currentPanel = currentPanel as? ChatRestrictedInputPanelNode {
|
||||
return currentPanel
|
||||
} else {
|
||||
let panel = ChatRestrictedInputPanelNode()
|
||||
panel.account = account
|
||||
panel.interfaceInteraction = interfaceInteraction
|
||||
return panel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var displayBotStartPanel = false
|
||||
|
||||
Reference in New Issue
Block a user