diff --git a/src/ClientService.ts b/src/ClientService.ts index 32e1401..a6d6530 100644 --- a/src/ClientService.ts +++ b/src/ClientService.ts @@ -105,6 +105,19 @@ export class ClientServices { this.connection.connect(); } + awaitSession() : Promise { + return new Promise(resolve => { + const unregister = this.events.on("notify_session_initialized", () => { + unregister(); + resolve(); + }); + }); + } + + isSessionInitialized() { + return this.sessionInitialized; + } + stop() { this.connection.disconnect(); clearTimeout(this.retryTimer);