cry-synced-db-client 0.1.98 → 0.1.99
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 +7 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7357,10 +7357,7 @@ var Ebus2ProxyServerUpdateNotifier = class {
|
|
|
7357
7357
|
this.connected = true;
|
|
7358
7358
|
this.reconnectAttempt = 0;
|
|
7359
7359
|
this.currentReconnectDelay = this.reconnectDelayMs;
|
|
7360
|
-
|
|
7361
|
-
const channel = `db/${this.dbName}/${collection}`;
|
|
7362
|
-
this.sendSubscribe(channel);
|
|
7363
|
-
}
|
|
7360
|
+
this.sendSubscribe(`db/${this.dbName}`);
|
|
7364
7361
|
this.startPingInterval();
|
|
7365
7362
|
for (const callback of this.onWsConnectCallbacks) {
|
|
7366
7363
|
try {
|
|
@@ -7420,7 +7417,12 @@ var Ebus2ProxyServerUpdateNotifier = class {
|
|
|
7420
7417
|
}
|
|
7421
7418
|
}
|
|
7422
7419
|
handleChannelMessage(message) {
|
|
7423
|
-
|
|
7420
|
+
const prefix = `db/${this.dbName}/`;
|
|
7421
|
+
if (!message.channel.startsWith(prefix)) {
|
|
7422
|
+
return;
|
|
7423
|
+
}
|
|
7424
|
+
const collection = message.channel.slice(prefix.length);
|
|
7425
|
+
if (!this.collections.includes(collection)) {
|
|
7424
7426
|
return;
|
|
7425
7427
|
}
|
|
7426
7428
|
const payload = message.data;
|