mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Support admins with empty rights
This commit is contained in:
@@ -582,7 +582,7 @@ public func channelAdminsController(context: AccountContext, peerId initialPeerI
|
||||
}
|
||||
}))
|
||||
} else {
|
||||
removeAdminDisposable.set((context.peerChannelMemberCategoriesContextsManager.updateMemberAdminRights(account: context.account, peerId: peerId, memberId: adminId, adminRights: TelegramChatAdminRights(flags: []), rank: nil)
|
||||
removeAdminDisposable.set((context.peerChannelMemberCategoriesContextsManager.updateMemberAdminRights(account: context.account, peerId: peerId, memberId: adminId, adminRights: nil, rank: nil)
|
||||
|> deliverOnMainQueue).start(completed: {
|
||||
updateState {
|
||||
return $0.withUpdatedRemovingPeerId(nil)
|
||||
@@ -701,7 +701,7 @@ public func channelAdminsController(context: AccountContext, peerId initialPeerI
|
||||
var peers: [PeerId: Peer] = [:]
|
||||
peers[creator.id] = creator
|
||||
peers[peer.id] = peer
|
||||
result.append(RenderedChannelParticipant(participant: .member(id: peer.id, invitedAt: 0, adminInfo: ChannelParticipantAdminInfo(rights: TelegramChatAdminRights(flags: .groupSpecific), promotedBy: creator.id, canBeEditedByAccountPeer: creator.id == context.account.peerId), banInfo: nil, rank: nil), peer: peer, peers: peers))
|
||||
result.append(RenderedChannelParticipant(participant: .member(id: peer.id, invitedAt: 0, adminInfo: ChannelParticipantAdminInfo(rights: TelegramChatAdminRights(rights: .groupSpecific), promotedBy: creator.id, canBeEditedByAccountPeer: creator.id == context.account.peerId), banInfo: nil, rank: nil), peer: peer, peers: peers))
|
||||
case .member:
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user