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 }