renamed user.id to user.jid

This commit is contained in:
Adhiraj
2020-08-28 20:22:35 +05:30
parent 890fb726f1
commit 828be7f240
8 changed files with 22 additions and 19 deletions

View File

@@ -61,7 +61,7 @@ export class WAConnection extends Base {
this.lastSeen = new Date() // set last seen to right now
})
// load profile picture
.then (() => this.query({ json: ['query', 'ProfilePicThumb', this.user.id], waitForOpen: false, expect200: false }))
.then (() => this.query({ json: ['query', 'ProfilePicThumb', this.user.jid], waitForOpen: false, expect200: false }))
.then (response => this.user.imgUrl = response?.eurl || '')
}
/**
@@ -92,7 +92,7 @@ export class WAConnection extends Base {
private validateNewConnection(json) {
// set metadata: one's WhatsApp ID [cc][number]@s.whatsapp.net, name on WhatsApp, info about the phone
const onValidationSuccess = () => ({
id: Utils.whatsappID(json.wid),
jid: Utils.whatsappID(json.wid),
name: json.pushname,
phone: json.phone,
imgUrl: null