From 77b722afc32b41e2c78f490cbfd72775ac508646 Mon Sep 17 00:00:00 2001 From: M SHAH Date: Tue, 2 May 2023 09:28:36 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20`joinWebBeta`=20#3113?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/Client.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/api/Client.ts b/src/api/Client.ts index 0502c7889f..78679df67c 100644 --- a/src/api/Client.ts +++ b/src/api/Client.ts @@ -72,6 +72,7 @@ declare module WAPI { const onGlobalParticipantsChanged: (callback: Function) => any; const onStory: (callback: Function) => any; const setChatBackgroundColourHex: (hex: string) => boolean; + const joinWebBeta: (join: boolean) => boolean; const darkMode: (activate: boolean) => boolean; const autoReject: (message: string) => boolean; const emitUnreadMessages: () => boolean; @@ -3801,6 +3802,18 @@ public async getStatus(contactId: ContactId) : Promise<{ ) as Promise; } + /** + * Join or leave the wa web beta program. Will return true of operation was successful. + * + * @param {boolean} join true to join the beta, false to leave + */ + public async joinWebBeta(join: boolean) : Promise { + return await this.pup( + (join) => WAPI.joinWebBeta(join), + join + ) as Promise; + } + /** * * Start dark mode [NOW GENERALLY AVAILABLE]