Chat Import fixes

This commit is contained in:
Ali
2021-01-25 01:52:48 +05:00
parent 0e21298773
commit 4b81b2cffa
5 changed files with 20 additions and 9 deletions

View File

@@ -571,7 +571,7 @@ public class ShareRootControllerImpl {
attemptSelectionImpl = { peer in
var errorText: String?
if let channel = peer as? TelegramChannel {
if channel.hasPermission(.changeInfo) {
if channel.hasPermission(.changeInfo), (channel.flags.contains(.isCreator) || channel.adminRights != nil) {
} else {
errorText = "You need to be an admin of the group to import messages into it."
}
@@ -771,7 +771,7 @@ public class ShareRootControllerImpl {
var errorText: String?
if let channel = peer as? TelegramChannel {
if channel.hasPermission(.changeInfo) {
if channel.hasPermission(.changeInfo), (channel.flags.contains(.isCreator) || channel.adminRights != nil) {
} else {
errorText = "You need to be an admin of the group to import messages into it."
}