@emotion-machine/claw-messenger 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/dist/channel.js +10 -4
- package/dist/outbound/send.js +1 -1
- package/package.json +1 -1
package/dist/channel.js
CHANGED
|
@@ -174,10 +174,16 @@ export const clawMessengerPlugin = {
|
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
176
|
if (action === "send") {
|
|
177
|
-
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
// OpenClaw passes target (string) and targets (string[]) — normalise to a single `to`
|
|
178
|
+
const rawTo = params.targets
|
|
179
|
+
?? params.to
|
|
180
|
+
?? params.target;
|
|
181
|
+
const to = typeof rawTo === "string" && rawTo.includes(",")
|
|
182
|
+
? rawTo.split(",").map((s) => s.trim()).filter(Boolean)
|
|
183
|
+
: rawTo;
|
|
184
|
+
const chatId = params.chatId ?? params.chat_id;
|
|
185
|
+
const text = params.message ?? params.text ?? "";
|
|
186
|
+
const mediaUrl = (params.media ?? params.mediaUrl)?.trim();
|
|
181
187
|
if (!text && !mediaUrl)
|
|
182
188
|
throw new Error("message or media is required");
|
|
183
189
|
if (chatId) {
|
package/dist/outbound/send.js
CHANGED