feat: Get corresponding Chat from Contact object and vice versa
close #269
This commit is contained in:
parent
34aa136bf9
commit
7180beda2e
3 changed files with 26 additions and 0 deletions
|
|
@ -186,6 +186,14 @@ class Chat extends Base {
|
|||
return true;
|
||||
}, this.id._serialized);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Contact that corresponds to this Chat.
|
||||
* @returns {Promise<Contact>}
|
||||
*/
|
||||
async getContact() {
|
||||
return await this.client.getContactById(this.id._serialized);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Chat;
|
||||
|
|
|
|||
Loading…
Reference in a new issue