Added connection-validated

This commit is contained in:
Adhiraj Singh
2020-10-15 17:11:21 +05:30
parent 6391e37198
commit 28cf354f43
2 changed files with 3 additions and 1 deletions

View File

@@ -64,6 +64,7 @@ export class WAConnection extends Base {
this.user = await this.validateNewConnection(validationJSON[1]) // validate the connection
this.logger.info('validated connection successfully')
this.emit ('connection-validated', this.user)
const response = await this.query({ json: ['query', 'ProfilePicThumb', this.user.jid], waitForOpen: false, expect200: false, requiresPhoneConnection: false })
this.user.imgUrl = response?.eurl || ''

View File

@@ -431,4 +431,5 @@ export type BaileysEvent =
'group-settings-update' |
'group-description-update' |
'received-pong' |
'credentials-updated'
'credentials-updated' |
'connection-validated'