mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Merge branch 'master' into features/64-bit
This commit is contained in:
@@ -65,7 +65,7 @@ func _internal_addGroupAdmin(account: Account, peerId: PeerId, adminId: PeerId)
|
||||
return account.network.request(Api.functions.messages.editChatAdmin(chatId: group.id.id._internalGetInt64Value(), userId: inputUser, isAdmin: .boolTrue))
|
||||
|> `catch` { error -> Signal<Api.Bool, AddGroupAdminError> in
|
||||
if error.errorDescription == "USER_NOT_PARTICIPANT" {
|
||||
return addGroupMember(account: account, peerId: peerId, memberId: adminId)
|
||||
return _internal_addGroupMember(account: account, peerId: peerId, memberId: adminId)
|
||||
|> mapError { error -> AddGroupAdminError in
|
||||
return .addMemberError(error)
|
||||
}
|
||||
@@ -188,7 +188,7 @@ func _internal_updateChannelAdminRights(account: Account, peerId: PeerId, adminI
|
||||
|> map { [$0] }
|
||||
|> `catch` { error -> Signal<[Api.Updates], UpdateChannelAdminRightsError> in
|
||||
if error.errorDescription == "USER_NOT_PARTICIPANT" {
|
||||
return addChannelMember(account: account, peerId: peerId, memberId: adminId)
|
||||
return _internal_addChannelMember(account: account, peerId: peerId, memberId: adminId)
|
||||
|> map { _ -> [Api.Updates] in
|
||||
return []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user