mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-16 15:21:03 +00:00
Merge branch 'master' into sh/nodejs-db
# Conflicts: # .github/workflows/build.yml
This commit is contained in:
@@ -563,6 +563,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