rol-websocket-channel 1.8.6 → 1.8.7

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 CHANGED
@@ -400,7 +400,7 @@ const WebSocketChannel = {
400
400
  if (targetTopic.endsWith("#")) {
401
401
  targetTopic = targetTopic.slice(0, -1) + "bot";
402
402
  }
403
- conn.ws.publish(targetTopic, replyMessage, { retain: true });
403
+ conn.ws.publish(targetTopic, replyMessage, { retain: false });
404
404
  return {
405
405
  content: [{ type: "text", text: JSON.stringify({ ok: true }) }],
406
406
  details: {},
@@ -624,7 +624,7 @@ async function handleIncomingMessage(payload, account, cfg, runtime, log, mqttTo
624
624
  targetTopic = targetTopic.slice(0, -1) + 'app';
625
625
  }
626
626
  targetTopic = targetTopic.replace('device', 'app').replace('bot', 'app');
627
- conn.ws.publish(targetTopic, JSON.stringify(replyMessage), { retain: true });
627
+ conn.ws.publish(targetTopic, JSON.stringify(replyMessage), { retain: false });
628
628
  },
629
629
  onError: (err) => {
630
630
  log?.error(`[rol-websocket-channel] Delivery error: ${err.message} ${err.stack}`);
@@ -768,7 +768,7 @@ function publishCustomMessageResponse(response, innerData, mqttTopic) {
768
768
  targetTopic = targetTopic.slice(0, -1) + 'app';
769
769
  }
770
770
  targetTopic = targetTopic.replace('device', 'app').replace('bot', 'app');
771
- conn.ws.publish(targetTopic, JSON.stringify(response), { retain: true });
771
+ conn.ws.publish(targetTopic, JSON.stringify(response), { retain: false });
772
772
  }
773
773
  }
774
774
  // ============================================
package/index.ts CHANGED
@@ -481,7 +481,7 @@ const WebSocketChannel: any = {
481
481
  targetTopic = targetTopic.slice(0, -1) + "bot";
482
482
  }
483
483
 
484
- conn.ws.publish(targetTopic, replyMessage, { retain: true });
484
+ conn.ws.publish(targetTopic, replyMessage, { retain: false });
485
485
 
486
486
  return {
487
487
  content: [{ type: "text" as const, text: JSON.stringify({ ok: true }) }],
@@ -782,7 +782,7 @@ async function handleIncomingMessage(
782
782
  }
783
783
  targetTopic = targetTopic.replace('device', 'app').replace('bot', 'app');
784
784
 
785
- conn.ws.publish(targetTopic, JSON.stringify(replyMessage), { retain: true });
785
+ conn.ws.publish(targetTopic, JSON.stringify(replyMessage), { retain: false });
786
786
  },
787
787
  onError: (err: Error) => {
788
788
  log?.error(`[rol-websocket-channel] Delivery error: ${err.message} ${err.stack}`);
@@ -960,7 +960,7 @@ function publishCustomMessageResponse(response: any, innerData: any, mqttTopic:
960
960
  }
961
961
  targetTopic = targetTopic.replace('device', 'app').replace('bot', 'app');
962
962
 
963
- conn.ws.publish(targetTopic, JSON.stringify(response), { retain: true });
963
+ conn.ws.publish(targetTopic, JSON.stringify(response), { retain: false });
964
964
  }
965
965
  }
966
966
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rol-websocket-channel",
3
- "version": "1.8.6",
3
+ "version": "1.8.7",
4
4
  "description": "Unified OpenClaw plugin: MQTT Channel + Admin Bridge for remote management",
5
5
  "license": "MIT",
6
6
  "author": "nixgnehc",