Skip to content

Commit

Permalink
feat: Added rejectGroupMembershipRequest function
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed May 30, 2023
1 parent 7b0e0e6 commit 9684395
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/api/layers/group.layer.ts
Expand Up @@ -406,4 +406,27 @@ export class GroupLayer extends RetrieverLayer {
{ groupId, membershipIds }
);
}

/**
* Reject a membership request to group
* @category Group
* @param groupId Group ID ('000000-000000@g.us')
* @param wid <number>@c.us
* @returns Promise
*/
public async rejectGroupMembershipRequest(
groupId: string,
membershipIds: string | string[]
): Promise<
{
error: any;
wid: Wid;
}[]
> {
return await evaluateAndReturn(
this.page,
({ groupId, membershipIds }) => WPP.group.reject(groupId, membershipIds),
{ groupId, membershipIds }
);
}
}

0 comments on commit 9684395

Please sign in to comment.