ios: change member role (#1164)

* ios: change member role

* chat item types, error alerts

* update alert

* translations

* update messages

* translation

Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>

* translation

Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>

* translation

Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>

* update translations

Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
This commit is contained in:
Evgeny Poberezkin
2022-10-04 09:53:43 +01:00
committed by GitHub
co-authored by JRoberts
parent cd6cad9a96
commit f9c691cab1
12 changed files with 614 additions and 39 deletions
+6
View File
@@ -702,6 +702,12 @@ func apiRemoveMember(_ groupId: Int64, _ memberId: Int64) async throws -> GroupM
throw r
}
func apiMemberRole(_ groupId: Int64, _ memberId: Int64, _ memberRole: GroupMemberRole) async throws -> GroupMember {
let r = await chatSendCmd(.apiMemberRole(groupId: groupId, memberId: memberId, memberRole: memberRole), bgTask: false)
if case let .memberRoleUser(_, member, _, _) = r { return member }
throw r
}
func leaveGroup(_ groupId: Int64) async {
do {
let groupInfo = try await apiLeaveGroup(groupId)