Skip to content

Commit

Permalink
✨ feat: getGroupApprovalRequests #3070
Browse files Browse the repository at this point in the history
  • Loading branch information
smashah committed Mar 23, 2023
1 parent b54a2de commit 785a51f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/api/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ declare module WAPI {
const sendListMessage: (to: ChatId, sections : any, title : string, description : string, actionText : string) => Promise<any>;
const ghostForward: (chatId: string, messageId: string) => Promise<boolean>;
const revokeGroupInviteLink: (chatId: string) => Promise<string> | Promise<boolean>;
const getGroupApprovalRequests: (chatId: string) => Promise<string> | Promise<boolean>;
const getGroupInviteLink: (chatId: string) => Promise<string>;
const sendImage: (
base64: string,
Expand Down Expand Up @@ -3304,6 +3305,20 @@ public async getStatus(contactId: ContactId) : Promise<{
) as Promise<string | boolean>;
}


/**
* Gets the contact IDs of members requesting approval to join the group
* @param groupChatId
* @returns `Promise<ContactId[]>`
*/
public async getGroupApprovalRequests(groupChatId: GroupChatId) : Promise<ContactId[]>{
return await this.pup(
groupChatId => WAPI.getGroupApprovalRequests(groupChatId),
groupChatId
) as Promise<ContactId[]>;
}


/**
* Deletes message of given message id
* @param chatId The chat id from which to delete the message.
Expand Down

0 comments on commit 785a51f

Please sign in to comment.