Skip to content

Commit

Permalink
✨ feat: getCommunityParticipants #3024
Browse files Browse the repository at this point in the history
  • Loading branch information
smashah committed Feb 13, 2023
1 parent e2d7381 commit 015ed7e
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 @@ -183,6 +183,7 @@ declare module WAPI {
const getCommunityAdminIds: (groupId: string) => Promise<any>;
const getCommunityAdmins: (groupId: string) => Promise<any>;
const getCommunityParticipantIds: (groupId: string) => Promise<any>;
const getCommunityParticipants: (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 @@ -2631,6 +2632,25 @@ public async testCallback(callbackToTest: SimpleListener, testData: any) : Prom
}


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

/**
* Retrieves community admins as Contact objects
* @param communityId community id
Expand Down

0 comments on commit 015ed7e

Please sign in to comment.