Skip to content

Commit

Permalink
feat: Added client.closeChat function (close #2271) (#2290)
Browse files Browse the repository at this point in the history
  • Loading branch information
gekkedev authored Aug 5, 2024
1 parent dca8f1e commit 539e5d9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/api/layers/ui.layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ export class UILayer extends GroupLayer {
chatId
);
}

/**
* Closes the currently opened chat (if any).
* The boolean result reflects if there was any chat that got closed.
* @category UI
*/
public async closeChat() {
return evaluateAndReturn(this.page, () => WPP.chat.closeChat());
}

/**
* Return the current active chat
* @category UI
Expand Down

0 comments on commit 539e5d9

Please sign in to comment.