Patch to stop awaiting for all subscription promises to be resolved before emitting login

This commit is contained in:
Diego Mello 2022-03-03 17:48:16 -03:00
parent 60ecbe284c
commit fb48b14e94
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff --git a/node_modules/@rocket.chat/sdk/lib/drivers/ddp.ts b/node_modules/@rocket.chat/sdk/lib/drivers/ddp.ts
index e751551..02703a0 100644
--- a/node_modules/@rocket.chat/sdk/lib/drivers/ddp.ts
+++ b/node_modules/@rocket.chat/sdk/lib/drivers/ddp.ts
@@ -298,7 +298,7 @@ export class Socket extends EventEmitter {
login = async (credentials: any) => {
const params = this.loginParams(credentials)
this.resume = (await this.call('login', params) as ILoginResult)
- await this.subscribeAll()
+ this.subscribeAll().catch(console.log)
this.emit('login', this.resume)
return this.resume
}