diff --git a/submodules/ChatListUI/Sources/ChatListController.swift b/submodules/ChatListUI/Sources/ChatListController.swift index 284cade852..0debd0179e 100644 --- a/submodules/ChatListUI/Sources/ChatListController.swift +++ b/submodules/ChatListUI/Sources/ChatListController.swift @@ -5253,7 +5253,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController return } var canEditRank = false - if let channel = peer as? TelegramChannel, channel.hasPermission(.editRank) { + if let channel = peer as? TelegramChannel, case .group = channel.info, channel.hasPermission(.editRank) { canEditRank = true } else if let group = peer as? TelegramGroup, !group.hasBannedPermission(.banEditRank) { canEditRank = true diff --git a/submodules/TelegramUI/Components/Chat/ChatChannelSubscriberInputPanelNode/Sources/ChatChannelSubscriberInputPanelNode.swift b/submodules/TelegramUI/Components/Chat/ChatChannelSubscriberInputPanelNode/Sources/ChatChannelSubscriberInputPanelNode.swift index 5ce697f49f..6c92a201d3 100644 --- a/submodules/TelegramUI/Components/Chat/ChatChannelSubscriberInputPanelNode/Sources/ChatChannelSubscriberInputPanelNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatChannelSubscriberInputPanelNode/Sources/ChatChannelSubscriberInputPanelNode.swift @@ -258,7 +258,7 @@ public final class ChatChannelSubscriberInputPanelNode: ChatInputPanelNode { Queue.mainQueue().after(0.5) { if let presentationInterfaceState = self.presentationInterfaceState, let peer = presentationInterfaceState.renderedPeer?.peer { var canEditRank = false - if let channel = peer as? TelegramChannel, channel.hasPermission(.editRank) { + if let channel = peer as? TelegramChannel, case .group = channel.info, channel.hasPermission(.editRank) { canEditRank = true } else if let group = peer as? TelegramGroup, !group.hasBannedPermission(.banEditRank) { canEditRank = true