feat: mark chat as unread (#475)
Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>
This commit is contained in:
parent
5c6195738f
commit
3e32fe27ea
1 changed files with 23 additions and 0 deletions
|
|
@ -689,6 +689,17 @@ class Client extends EventEmitter {
|
|||
}, chatId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark the Chat as unread
|
||||
* @param {string} chatId ID of the chat that will be marked as unread
|
||||
*/
|
||||
async markChatUnread(chatId) {
|
||||
await this.pupPage.evaluate(async chatId => {
|
||||
let chat = await window.Store.Chat.get(chatId);
|
||||
await window.Store.Cmd.markChatUnread(chat, true);
|
||||
}, chatId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the contact ID's profile picture URL, if privacy settings allow it
|
||||
* @param {string} contactId the whatsapp user's ID
|
||||
|
|
|
|||
Loading…
Reference in a new issue