diff --git a/src/api/Client.ts b/src/api/Client.ts index ea3ce0456a..2a407ab98f 100644 --- a/src/api/Client.ts +++ b/src/api/Client.ts @@ -158,6 +158,7 @@ declare module WAPI { const sendListMessage: (to: ChatId, sections : any, title : string, description : string, actionText : string) => Promise; const ghostForward: (chatId: string, messageId: string) => Promise; const revokeGroupInviteLink: (chatId: string) => Promise | Promise; + const getGroupApprovalRequests: (chatId: string) => Promise | Promise; const getGroupInviteLink: (chatId: string) => Promise; const sendImage: ( base64: string, @@ -3304,6 +3305,20 @@ public async getStatus(contactId: ContactId) : Promise<{ ) as Promise; } + + /** + * Gets the contact IDs of members requesting approval to join the group + * @param groupChatId + * @returns `Promise` + */ + public async getGroupApprovalRequests(groupChatId: GroupChatId) : Promise{ + return await this.pup( + groupChatId => WAPI.getGroupApprovalRequests(groupChatId), + groupChatId + ) as Promise; + } + + /** * Deletes message of given message id * @param chatId The chat id from which to delete the message.