fix: livechat sdk reconnect not resubscribing (#31941)

pull/31878/head^2
Guilherme Gazzo 2 years ago committed by GitHub
parent bda5dfe4c0
commit 1ca08cac9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      .changeset/empty-hounds-jog.md
  2. 4
      ee/packages/ddp-client/src/livechat/LivechatClientImpl.ts

@ -0,0 +1,5 @@
---
"@rocket.chat/ddp-client": patch
---
fix: livechat sdk reconnect not resubscribing

@ -381,9 +381,9 @@ export class LivechatClientImpl extends DDPSDK implements LivechatStream, Livech
const sdk = new LivechatClientImpl(connection, stream, account, timeoutControl, rest);
connection.on('connected', () => {
Object.entries(stream.subscriptions).forEach(([, sub]) => {
for (const [, sub] of stream.subscriptions.entries()) {
ddp.subscribeWithId(sub.id, sub.name, sub.params);
});
}
});
return sdk;

Loading…
Cancel
Save