mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-15 06:50:19 +00:00
core, ui: invite member of one group to another group (#7682)
* rfc: invite member of one group to another group * update * update * implement * version * update * do not show error if contact was removed when joining group --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
This commit is contained in:
co-authored by
Evgeny @ SimpleX Chat
parent
1053e9fb5c
commit
07c363849b
@@ -261,6 +261,12 @@ export class ChatClient {
|
||||
throw new ChatCommandError("error adding member", r)
|
||||
}
|
||||
|
||||
async apiAddMemberViaGroup(groupId: number, viaGroupId: number, groupMemberId: number, memberRole: T.GroupMemberRole): Promise<T.GroupMember> {
|
||||
const r = await this.sendChatCmd(CC.APIAddMemberViaGroup.cmdString({groupId, viaGroupId, groupMemberId, memberRole}))
|
||||
if (r.type === "sentGroupInvitationViaGroup") return r.member
|
||||
throw new ChatCommandError("error adding member", r)
|
||||
}
|
||||
|
||||
async apiJoinGroup(groupId: number): Promise<T.GroupInfo> {
|
||||
const r = await this.sendChatCmd(CC.APIJoinGroup.cmdString({groupId}))
|
||||
if (r.type === "userAcceptedGroupSent") return r.groupInfo
|
||||
|
||||
Reference in New Issue
Block a user