Skip to content

Commit

Permalink
fix: Fixed code for getGroupAdmins (fix #899)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Feb 22, 2022
1 parent 0fff593 commit a50809e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/api/layers/group.layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ export class GroupLayer extends RetrieverLayer {
public async getGroupAdmins(chatId: string) {
const participants = await evaluateAndReturn(
this.page,
(chatId) => WPP.group.getParticipants(chatId).map((p) => p.toJSON()),
(chatId) =>
Promise.resolve(WPP.group.getParticipants(chatId)).then(
(participants) => participants.map((p) => p.toJSON())
),
chatId
);

Expand Down

0 comments on commit a50809e

Please sign in to comment.