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:
dyegoaurelio
2020-12-17 17:30:36 -03:00
committed by Pedro S. Lopez
parent 563f73d290
commit 274d24002b
6 changed files with 166 additions and 2 deletions

View File

@@ -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;