@umimoney/clawdbot-relay-plugin 0.1.15 → 0.1.16
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/clawdbot.plugin.json +1 -1
- package/dist/index.js +4 -3
- package/dist/index.mjs +4 -3
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://clawdbot.dev/schemas/plugin.json",
|
|
3
3
|
"id": "umi-relay",
|
|
4
4
|
"name": "UMI Relay",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.16",
|
|
6
6
|
"description": "Connect to UMI relay server for real-time chat visibility in UMI web UI",
|
|
7
7
|
"type": "channel",
|
|
8
8
|
"main": "index.js",
|
package/dist/index.js
CHANGED
|
@@ -341,15 +341,16 @@ var umiRelayChannel = {
|
|
|
341
341
|
relayClient = new UmiRelayClient(config);
|
|
342
342
|
relayClient.onMessage((message) => {
|
|
343
343
|
if (message.type === "platform:message") {
|
|
344
|
-
const userId = message.userId || "unknown";
|
|
345
|
-
console.log("[UmiRelay] Dispatching message to Clawdbot:", message.content);
|
|
344
|
+
const userId = String(message.userId || message.senderId || "unknown");
|
|
345
|
+
console.log("[UmiRelay] Dispatching message to Clawdbot:", message.content, "from:", userId);
|
|
346
346
|
try {
|
|
347
347
|
const runtime = getPluginRuntime();
|
|
348
348
|
runtime.channel.reply.dispatchReplyWithBufferedBlockDispatcher({
|
|
349
349
|
ctx: {
|
|
350
350
|
channel: "umi-relay",
|
|
351
351
|
From: userId,
|
|
352
|
-
|
|
352
|
+
// Must be string
|
|
353
|
+
Text: String(message.content || ""),
|
|
353
354
|
accountId: "default",
|
|
354
355
|
ts: message.timestamp,
|
|
355
356
|
metadata: {
|
package/dist/index.mjs
CHANGED
|
@@ -306,15 +306,16 @@ var umiRelayChannel = {
|
|
|
306
306
|
relayClient = new UmiRelayClient(config);
|
|
307
307
|
relayClient.onMessage((message) => {
|
|
308
308
|
if (message.type === "platform:message") {
|
|
309
|
-
const userId = message.userId || "unknown";
|
|
310
|
-
console.log("[UmiRelay] Dispatching message to Clawdbot:", message.content);
|
|
309
|
+
const userId = String(message.userId || message.senderId || "unknown");
|
|
310
|
+
console.log("[UmiRelay] Dispatching message to Clawdbot:", message.content, "from:", userId);
|
|
311
311
|
try {
|
|
312
312
|
const runtime = getPluginRuntime();
|
|
313
313
|
runtime.channel.reply.dispatchReplyWithBufferedBlockDispatcher({
|
|
314
314
|
ctx: {
|
|
315
315
|
channel: "umi-relay",
|
|
316
316
|
From: userId,
|
|
317
|
-
|
|
317
|
+
// Must be string
|
|
318
|
+
Text: String(message.content || ""),
|
|
318
319
|
accountId: "default",
|
|
319
320
|
ts: message.timestamp,
|
|
320
321
|
metadata: {
|