Skip to content

Commit

Permalink
feat: Added setGroupIco function
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Jul 19, 2022
1 parent 2c25b01 commit 08b06f4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/api/layers/group.layer.ts
Expand Up @@ -298,4 +298,19 @@ export class GroupLayer extends RetrieverLayer {
{ groupId, property, value }
);
}

/**
* Set group subject (if allowed)
* @category Group
* @param groupId Group ID ('000000-000000@g.us')
* @param base64 Image in base64 ( data:image/jpeg;base64,..... )
* @returns empty object
*/
public async setGroupIcon(groupId: string, base64: string) {
return await evaluateAndReturn(
this.page,
({ groupId, base64 }) => WPP.group.setIcon(groupId, base64),
{ groupId, base64 }
);
}
}

0 comments on commit 08b06f4

Please sign in to comment.