From 7eb454b3dd79c17b327249fd665442543f5cb53c Mon Sep 17 00:00:00 2001 From: Adhiraj Date: Thu, 17 Sep 2020 16:10:45 +0530 Subject: [PATCH] Added user --- src/WAConnection/3.Connect.ts | 2 +- src/WAConnection/Constants.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/WAConnection/3.Connect.ts b/src/WAConnection/3.Connect.ts index 00c1b32..93a80d8 100644 --- a/src/WAConnection/3.Connect.ts +++ b/src/WAConnection/3.Connect.ts @@ -47,7 +47,7 @@ export class WAConnection extends Base { } const updatedChats = !!this.lastDisconnectTime && updates - const result: WAOpenResult = { newConnection, updatedChats } + const result: WAOpenResult = { user: this.user, newConnection, updatedChats } this.emit ('open', result) this.releasePendingRequests () diff --git a/src/WAConnection/Constants.ts b/src/WAConnection/Constants.ts index a5b53c1..e98928f 100644 --- a/src/WAConnection/Constants.ts +++ b/src/WAConnection/Constants.ts @@ -339,6 +339,7 @@ export interface WAMessageStatusUpdate { export interface WAOpenResult { /** Was this connection opened via a QR scan */ newConnection: boolean + user: WAUser updatedChats?: { [k: string]: Partial }