From 2120ea852f60a6e64d989a43118d2f30d8f58b5c Mon Sep 17 00:00:00 2001 From: M SHAH Date: Tue, 14 Feb 2023 01:54:10 +0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20`acceptGroupJoinRequest`=20?= =?UTF-8?q?#3024?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/Client.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/api/Client.ts b/src/api/Client.ts index 28fcdf8e35..8e61f847e2 100644 --- a/src/api/Client.ts +++ b/src/api/Client.ts @@ -145,6 +145,7 @@ declare module WAPI { const contactBlock: (id: string) => Promise; const checkReadReceipts: (contactId: string) => Promise; const REPORTSPAM: (id: string) => Promise; + const acceptGroupJoinRequest: (id: string) => Promise; const contactUnblock: (id: string) => Promise; const deleteConversation: (chatId: string) => Promise; const isChatMuted: (chatId: string) => Promise; @@ -2563,6 +2564,16 @@ public async testCallback(callbackToTest: SimpleListener, testData: any) : Prom ) as Promise; } + + /** + * + * Accepts a request from a recipient to join a group. Takes the message ID of the request message. + * + * @param {string} messageId + */ + public async acceptGroupJoinRequest(messageId: MessageId) : Promise { + return await this.pup(messageId => WAPI.acceptGroupJoinRequest(messageId),messageId) + } /** Joins a group via the invite link, code, or message * @param link This param is the string which includes the invite link or code. The following work: