Skip to content

Commit 6459605

Browse files
committed
✨ feat: getCommunityInfo #3024
1 parent 2120ea8 commit 6459605

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
@@ -179,6 +179,7 @@ declare module WAPI {
179179
chatId: string
180180
) => Promise<boolean>;
181181
const getBusinessProfilesProducts: (to: string) => Promise<any>;
182+
const getCommunityInfo: (groupId: string) => Promise<any>;
182183
const postStatus: (text: string, params: any) => Promise<any>;
183184
const deleteStatus: (statusesToDelete: string | string[]) => Promise<any>;
184185
const sendImageWithProduct: (base64: string, to: string, caption: string, bizNumber: string, productId: string) => any;
@@ -2565,6 +2566,19 @@ public async testCallback(callbackToTest: SimpleListener, testData: any) : Prom
25652566
}
25662567

25672568

2569+
/**
2570+
* Returns the community metadata. Like group metadata but with a `subGroups` property which is the group metadata of the community subgroups.
2571+
* @param communityId community id
2572+
*/
2573+
public async getCommunityInfo(communityId: GroupChatId) : Promise<GroupMetadata & {
2574+
subGroups: GroupMetadata[]
2575+
}> {
2576+
return await this.pup(
2577+
communityId => WAPI.getCommunityInfo(communityId),
2578+
communityId
2579+
) as Promise<any>;
2580+
}
2581+
25682582
/**
25692583
*
25702584
* Accepts a request from a recipient to join a group. Takes the message ID of the request message.

0 commit comments

Comments
 (0)