cross-tab-worker-databus 0.1.0 → 0.1.1
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/CHANGELOG.md +8 -0
- package/dist/centrifuge-session.d.ts.map +1 -1
- package/dist/centrifuge.js +5 -1
- package/dist/centrifuge.js.map +2 -2
- package/dist/centrifuge.shared.worker.js +19 -4
- package/dist/centrifuge.shared.worker.js.map +2 -2
- package/dist/centrifuge.worker.js +5 -1
- package/dist/centrifuge.worker.js.map +2 -2
- package/dist/workers/port-reaper.d.ts +2 -1
- package/dist/workers/port-reaper.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -5010,7 +5010,11 @@ var CentrifugeSession = class {
|
|
|
5010
5010
|
client.on("connected", () => this.post({ type: "STATUS", status: "connected" }));
|
|
5011
5011
|
client.on("disconnected", () => this.post({ type: "STATUS", status: "disconnected" }));
|
|
5012
5012
|
client.on("error", (context) => this.postError(context));
|
|
5013
|
-
client.on("publication", (context) =>
|
|
5013
|
+
client.on("publication", (context) => {
|
|
5014
|
+
const topic = context.channel || getPayloadTopic(context.data);
|
|
5015
|
+
if (!topic || this.subscriptions.has(topic)) return;
|
|
5016
|
+
this.postPublication(topic, context.data);
|
|
5017
|
+
});
|
|
5014
5018
|
client.connect();
|
|
5015
5019
|
}
|
|
5016
5020
|
/** Subscribe to a Centrifuge channel. Reuses an existing subscription if one exists. */
|