no message

This commit is contained in:
Peter
2017-06-06 13:13:26 +03:00
parent d55e3da7b3
commit b8230a4fdb
397 changed files with 28757 additions and 6756 deletions

View File

@@ -17,20 +17,10 @@ func contextMenuForChatPresentationIntefaceState(_ chatPresentationInterfaceStat
if let channel = peer as? TelegramChannel {
switch channel.info {
case .broadcast:
switch channel.role {
case .creator, .editor, .moderator:
canReply = true
case .member:
canReply = false
}
canReply = channel.hasAdminRights([.canPostMessages])
case .group:
canReply = true
switch channel.role {
case .creator, .editor, .moderator:
canPin = true
case .member:
canPin = false
}
canPin = channel.hasAdminRights([.canPinMessages])
}
} else {
canReply = true
@@ -133,13 +123,8 @@ func chatDeleteMessagesOptions(account: Account, messageIds: Set<MessageId>) ->
if !message.flags.contains(.Incoming) {
options.insert(.globally)
} else {
switch channel.role {
case .creator:
options.insert(.globally)
case .moderator, .editor:
options.insert(.globally)
case .member:
break
if channel.hasAdminRights([.canDeleteMessages]) {
options.insert(.globally)
}
}
optionsMap[message.id] = options