From fb48b14e9411de411f71ba1f72c73434200a00d7 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Thu, 3 Mar 2022 17:48:16 -0300 Subject: [PATCH] Patch to stop awaiting for all subscription promises to be resolved before emitting login --- patches/@rocket.chat+sdk+1.2.0-mobile.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 patches/@rocket.chat+sdk+1.2.0-mobile.patch diff --git a/patches/@rocket.chat+sdk+1.2.0-mobile.patch b/patches/@rocket.chat+sdk+1.2.0-mobile.patch new file mode 100644 index 000000000..a018f8279 --- /dev/null +++ b/patches/@rocket.chat+sdk+1.2.0-mobile.patch @@ -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 + }