mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-18 03:29:14 +00:00
feat: WA Business Labels support (#407)
* Get all labels * Get chats by label * Get labels assigned to chats Co-authored-by: Pedro S. Lopez <pslamoros@hotmail.com> Co-authored-by: Pedro Lopez <pedroslopez@me.com>
This commit is contained in:
committed by
Pedro S. Lopez
parent
563f73d290
commit
274d24002b
@@ -229,6 +229,14 @@ class Chat extends Base {
|
||||
async getContact() {
|
||||
return await this.client.getContactById(this.id._serialized);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns array of all Labels assigned to this Chat
|
||||
* @returns {Promise<Array<Label>>}
|
||||
*/
|
||||
async getLabels() {
|
||||
return this.client.getChatLabels(this.id._serialized);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Chat;
|
||||
|
||||
Reference in New Issue
Block a user