@openclaw-china/dingtalk 0.1.21 → 0.1.22
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 +14 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6153,7 +6153,7 @@ async function handleDingtalkMessage(params) {
|
|
|
6153
6153
|
const dingtalkCfg = cfg?.channels;
|
|
6154
6154
|
const channelCfg = dingtalkCfg?.dingtalk;
|
|
6155
6155
|
if (isGroup) {
|
|
6156
|
-
const groupPolicy = channelCfg?.groupPolicy ?? "
|
|
6156
|
+
const groupPolicy = channelCfg?.groupPolicy ?? "open";
|
|
6157
6157
|
const groupAllowFrom = channelCfg?.groupAllowFrom ?? [];
|
|
6158
6158
|
const requireMention = channelCfg?.requireMention ?? true;
|
|
6159
6159
|
const policyResult = checkGroupPolicy({
|
|
@@ -6168,7 +6168,7 @@ async function handleDingtalkMessage(params) {
|
|
|
6168
6168
|
return;
|
|
6169
6169
|
}
|
|
6170
6170
|
} else {
|
|
6171
|
-
const dmPolicy2 = channelCfg?.dmPolicy ?? "
|
|
6171
|
+
const dmPolicy2 = channelCfg?.dmPolicy ?? "open";
|
|
6172
6172
|
const allowFrom = channelCfg?.allowFrom ?? [];
|
|
6173
6173
|
const policyResult = checkDmPolicy({
|
|
6174
6174
|
dmPolicy: dmPolicy2,
|
|
@@ -6371,6 +6371,14 @@ async function handleDingtalkMessage(params) {
|
|
|
6371
6371
|
const chunkMode = textApi?.resolveChunkMode?.(cfg, "dingtalk");
|
|
6372
6372
|
const tableMode = "bullets";
|
|
6373
6373
|
const deliver = async (payload) => {
|
|
6374
|
+
logger.debug(
|
|
6375
|
+
`[reply] payload=${JSON.stringify({
|
|
6376
|
+
hasText: typeof payload.text === "string",
|
|
6377
|
+
text: payload.text,
|
|
6378
|
+
mediaUrl: payload.mediaUrl,
|
|
6379
|
+
mediaUrls: payload.mediaUrls
|
|
6380
|
+
})}`
|
|
6381
|
+
);
|
|
6374
6382
|
const targetId = isGroup ? ctx.conversationId : ctx.senderId;
|
|
6375
6383
|
const chatType = isGroup ? "group" : "direct";
|
|
6376
6384
|
const mediaUrls = payload.mediaUrls ?? (payload.mediaUrl ? [payload.mediaUrl] : []);
|
|
@@ -6472,7 +6480,10 @@ async function handleDingtalkMessage(params) {
|
|
|
6472
6480
|
const markDispatchIdle = dispatcherResult?.markDispatchIdle;
|
|
6473
6481
|
markDispatchIdle?.();
|
|
6474
6482
|
const counts = result?.counts;
|
|
6475
|
-
|
|
6483
|
+
const queuedFinal = result?.queuedFinal;
|
|
6484
|
+
logger.debug(
|
|
6485
|
+
`dispatch complete (queuedFinal=${typeof queuedFinal === "boolean" ? queuedFinal : "unknown"}, replies=${counts?.final ?? 0})`
|
|
6486
|
+
);
|
|
6476
6487
|
if (downloadedMedia && extractedFileInfo) {
|
|
6477
6488
|
const category = resolveFileCategory(downloadedMedia.contentType, extractedFileInfo.fileName);
|
|
6478
6489
|
if (category === "image" || category === "audio" || category === "video") {
|