@yaoyuanchao/dingtalk 1.5.3 → 1.5.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/monitor.ts +12 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaoyuanchao/dingtalk",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "type": "module",
5
5
  "description": "DingTalk channel plugin for ClawdBot/OpenClaw with Stream Mode support",
6
6
  "license": "MIT",
package/src/monitor.ts CHANGED
@@ -144,6 +144,18 @@ async function extractMessageContent(
144
144
  return extractPictureContent(msg, log);
145
145
  }
146
146
 
147
+ case 'markdown': {
148
+ // DingTalk markdown messages have content in content.text or content.title
149
+ const markdownText = content?.text?.trim() || '';
150
+ const markdownTitle = content?.title?.trim() || '';
151
+ const text = markdownText || markdownTitle || '[Markdown消息]';
152
+ log?.info?.("[dingtalk] Markdown message received (" + text.length + " chars)");
153
+ return {
154
+ text,
155
+ messageType: 'markdown',
156
+ };
157
+ }
158
+
147
159
  case 'audio': {
148
160
  // DingTalk provides speech recognition result in content.recognition
149
161
  const recognition = content?.recognition;