Feat: Add chat_removed and chat_archived events (#1778)

* Add chat_removed and chat_archived events

* Make eslint happy

---------

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
Co-authored-by: Aliyss Snow <33941859+Aliyss@users.noreply.github.com>
This commit is contained in:
Wictor Nogueira 2023-04-01 16:19:11 -03:00 • committed by GitHub
commit f44555713d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 1 deletions

16
index.d.ts vendored
View file

@ -265,6 +265,22 @@ declare namespace WAWebJS {
reaction: Reaction
) => void): this
/** Emitted when a chat is removed */
on(event: 'chat_removed', listener: (
/** The chat that was removed */
chat: Chat
) => void): this
/** Emitted when a chat is archived/unarchived */
on(event: 'chat_archived', listener: (
/** The chat that was archived/unarchived */
chat: Chat,
/** State the chat is currently in */
currState: boolean,
/** State the chat was previously in */
prevState: boolean
) => void): this
/** Emitted when loading screen is appearing */
on(event: 'loading_screen', listener: (percent: string, message: string) => void): this