handle tags via EventEmitter + replace 'intermediate-close' with 'ws-close'

This commit is contained in:
Adhiraj Singh
2020-10-30 17:42:45 +05:30
parent 9366c45842
commit 69da12c33c
9 changed files with 101 additions and 102 deletions

View File

@@ -183,8 +183,8 @@ on (event: 'open', listener: (result: WAOpenResult) => void): this
on (event: 'connecting', listener: () => void): this
/** when the connection has closed */
on (event: 'close', listener: (err: {reason?: DisconnectReason | string, isReconnecting: boolean}) => void): this
/** when the connection has closed */
on (event: 'intermediate-close', listener: (err: {reason?: DisconnectReason | string}) => void): this
/** when the socket has closed */
on (event: 'ws-close', listener: (err: {reason?: DisconnectReason | string}) => void): this
/** when WA updates the credentials */
on (event: 'credentials-updated', listener: (auth: AuthenticationCredentials) => void): this
/** when a new QR is generated, ready for scanning */