feat: Pin and unpin Chats (#166)

* Added Pinning
- chat.pin() to pin
- chat.unpin() to unpin

Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>
This commit is contained in:
Aliyss Snow 2020-10-11 21:50:12 +02:00 • committed by GitHub
commit aedf41b762
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 74 additions and 2 deletions

12
index.d.ts vendored
View file

@ -17,7 +17,13 @@ declare namespace WAWebJS {
getInviteInfo(inviteCode: string): Promise<object>
/** Enables and returns the archive state of the Chat */
archiveChat(): Promise<boolean>
archiveChat(chatId: string): Promise<boolean>
/** Pins the Chat and returns its new Pin state */
pinChat(chatId: string): Promise<boolean>
/** Unpins the Chat and returns its new Pin state */
unpinChat(chatId: string): Promise<boolean>
/**
* Create a new group
@ -679,6 +685,10 @@ declare namespace WAWebJS {
/** Archives this chat */
archive: () => Promise<void>,
/** Pins this chat and returns its new Pin state */
pin: () => Promise<boolean>,
/** Unpins this chat and returns its new Pin state */
unpin: () => Promise<boolean>,
/** Clears all messages from the chat */
clearMessages: () => Promise<boolean>,
/** Stops typing or recording in chat immediately. */