feat: send typing in chat (#87)

Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>
This commit is contained in:
Anderson de Oliveira Machado
2020-02-29 14:55:27 -03:00
committed by GitHub
parent 72441beb37
commit d35f101fac
3 changed files with 21 additions and 2 deletions

View File

@@ -102,7 +102,17 @@ class Chat extends Base {
async unarchive() {
return this.client.unarchiveChat(this.id._serialized);
}
/**
* Start typing in chat. This will last for 25 seconds.
*/
async sendTyping() {
return this.client.pupPage.evaluate(chatId => {
window.WWebJS.typing(chatId);
return true;
}, this.id._serialized);
}
}
module.exports = Chat;
module.exports = Chat;