Skip to content

Commit

Permalink
✨ feat: getCommunityParticipantIds #3024
Browse files Browse the repository at this point in the history
  • Loading branch information
smashah committed Feb 13, 2023
1 parent 6459605 commit 230f459
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/api/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ declare module WAPI {
) => Promise<boolean>;
const getBusinessProfilesProducts: (to: string) => Promise<any>;
const getCommunityInfo: (groupId: string) => Promise<any>;
const getCommunityParticipantIds: (groupId: string) => Promise<any>;
const postStatus: (text: string, params: any) => Promise<any>;
const deleteStatus: (statusesToDelete: string | string[]) => Promise<any>;
const sendImageWithProduct: (base64: string, to: string, caption: string, bizNumber: string, productId: string) => any;
Expand Down Expand Up @@ -2589,6 +2590,25 @@ public async testCallback(callbackToTest: SimpleListener, testData: any) : Prom
return await this.pup(messageId => WAPI.acceptGroupJoinRequest(messageId),messageId)
}

/**
* Retrieves community members Ids
* @param communityId community id
*/
public async getCommunityParticipantIds(communityId: GroupChatId) : Promise<{
id: GroupChatId,
participants: ContactId[],
subgroup: boolean
}[]>{
return await this.pup(
communityId => WAPI.getCommunityParticipantIds(communityId),
communityId
) as Promise<{
id: GroupChatId,
participants: ContactId[],
subgroup: boolean
}[]>;
}

/** 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:
* - Follow this link to join my WA group: https://chat.whatsapp.com/DHTGJUfFJAV9MxOpZO1fBZ
Expand Down

0 comments on commit 230f459

Please sign in to comment.