diff --git a/package.json b/package.json index 517420c..749e81b 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ }, "devDependencies": { "@types/mocha": "7.0.2", - "@types/node": "14.0.27", + "@types/node": "^14.0.27", "@types/ws": "^7.2.6", "assert": "^2.0.0", "dotenv": "^8.2.0", diff --git a/src/WAConnection/4.Events.ts b/src/WAConnection/4.Events.ts index 4befbab..da4df18 100644 --- a/src/WAConnection/4.Events.ts +++ b/src/WAConnection/4.Events.ts @@ -142,7 +142,7 @@ export class WAConnection extends Base { } /** Set the callback for presence updates; if someone goes offline/online, this callback will be fired */ protected registerOnPresenceUpdate() { - this.registerCallback('Presence', json => this.emit('user-presence-update', json[1])) + this.registerCallback('Presence', json => this.emit('user-presence-update', json[1] as PresenceUpdate)) } /** inserts an empty chat into the DB */ protected async chatAdd (jid: string, title?: string) {