mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-13 02:18:49 +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
@@ -564,6 +564,16 @@ export class ChatApi {
|
||||
throw new ChatCommandError("error adding member", r)
|
||||
}
|
||||
|
||||
/**
|
||||
* Add member of another group to group. Requires bot to have Admin role in the group, and direct messages allowed for its role in another group.
|
||||
* Network usage: interactive.
|
||||
*/
|
||||
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)
|
||||
}
|
||||
|
||||
/**
|
||||
* Join group.
|
||||
* Network usage: interactive.
|
||||
|
||||
Reference in New Issue
Block a user