@telestack/db-sdk 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -501,7 +501,10 @@ export class Query {
|
|
|
501
501
|
if (!centrifuge)
|
|
502
502
|
return () => { };
|
|
503
503
|
const channel = `collection:${this.path.replace(/\//g, '_')}`;
|
|
504
|
-
|
|
504
|
+
let sub = centrifuge.getSubscription(channel);
|
|
505
|
+
if (!sub) {
|
|
506
|
+
sub = centrifuge.newSubscription(channel);
|
|
507
|
+
}
|
|
505
508
|
sub.on('join', (ctx) => {
|
|
506
509
|
callback({ action: 'join', user: ctx.info.user, clientId: ctx.info.client });
|
|
507
510
|
});
|