Skip to content

Commit

Permalink
feat: Added client.removeMyProfilePicture
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Apr 29, 2023
1 parent 0b5e28b commit 9d0f239
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/api/layers/profile.layer.ts
Expand Up @@ -151,12 +151,19 @@ export class ProfileLayer extends StatusLayer {
* @param name
*/
public async setProfileName(name: string) {
return evaluateAndReturn(
return await evaluateAndReturn(
this.page,
({ name }) => {
WAPI.setMyName(name);
},
({ name }) => WPP.profile.setMyProfileName(name),
{ name }
);
}
/**
* Remove your profile picture
* @category Profile
*/
public async removeMyProfilePicture() {
return await evaluateAndReturn(this.page, () =>
WPP.profile.removeMyProfilePicture()
);
}
}

0 comments on commit 9d0f239

Please sign in to comment.