Skip to content

Commit e2d7381

Browse files
committed
✨ feat: getCommunityAdminIds
1 parent 2319ff5 commit e2d7381

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/api/Client.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ declare module WAPI {
180180
) => Promise<boolean>;
181181
const getBusinessProfilesProducts: (to: string) => Promise<any>;
182182
const getCommunityInfo: (groupId: string) => Promise<any>;
183+
const getCommunityAdminIds: (groupId: string) => Promise<any>;
183184
const getCommunityAdmins: (groupId: string) => Promise<any>;
184185
const getCommunityParticipantIds: (groupId: string) => Promise<any>;
185186
const postStatus: (text: string, params: any) => Promise<any>;
@@ -2610,6 +2611,25 @@ public async testCallback(callbackToTest: SimpleListener, testData: any) : Prom
26102611
}[]>;
26112612
}
26122613

2614+
/**
2615+
* Retrieves community admin Ids
2616+
* @param communityId community id
2617+
*/
2618+
public async getCommunityAdminIds(communityId: GroupChatId) : Promise<{
2619+
id: GroupChatId,
2620+
admins: ContactId[],
2621+
subgroup: boolean
2622+
}[]>{
2623+
return await this.pup(
2624+
communityId => WAPI.getCommunityAdminIds(communityId),
2625+
communityId
2626+
) as Promise<{
2627+
id: GroupChatId,
2628+
admins: ContactId[],
2629+
subgroup: boolean
2630+
}[]>;
2631+
}
2632+
26132633

26142634
/**
26152635
* Retrieves community admins as Contact objects

0 commit comments

Comments
 (0)