Skip to content

Commit d89c792

Browse files
committed
✨ feat: getFeatures #2900
1 parent ffc9cff commit d89c792

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/api/Client.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ declare module WAPI {
195195
const getWAVersion: () => String;
196196
const getStoryViewers: (id: string) => Promise<String[]>;
197197
const getMe: () => any;
198+
const getFeatures: () => any;
198199
const getAllLabels: () => any;
199200
const iAmAdmin: () => Promise<String[]>;
200201
const getKickedGroups: () => Promise<String[]>;
@@ -1471,6 +1472,12 @@ public async testCallback(callbackToTest: SimpleListener, testData: any) : Prom
14711472
*
14721473
* Send advanced buttons with media body. This is an insiders feature for MD accounts.
14731474
*
1475+
* :::caution
1476+
*
1477+
* Button messages are being progressively handicapped by recipient mobile devices. Some recipients may not see some types of button messages even though their devices will receive them.
1478+
*
1479+
* :::
1480+
*
14741481
* Body can be location, image, video or document. Buttons can be quick reply, url or call buttons.
14751482
*
14761483
* @param {ChatId} to chat id
@@ -1994,6 +2001,13 @@ public async testCallback(callbackToTest: SimpleListener, testData: any) : Prom
19942001
return await this._page.evaluate(() => WAPI.getMe());
19952002
}
19962003

2004+
/**
2005+
* Returns an object with properties of internal features and boolean values that represent if the respective feature is enabled or not.
2006+
*/
2007+
public async getFeatures() : Promise<any> {
2008+
return await this._page.evaluate(() => WAPI.getFeatures());
2009+
}
2010+
19972011
/**
19982012
* Returns a PNG DataURL screenshot of the session
19992013
* @returns `Promise<DataURL>`

0 commit comments

Comments
 (0)