csdn-im 0.1.6 → 0.1.8
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.cjs +7 -2
- package/dist/index.js +6 -1
- package/package.json +3 -5
package/dist/index.cjs
CHANGED
|
@@ -4583,8 +4583,13 @@ var csdnOutbound = {
|
|
|
4583
4583
|
}
|
|
4584
4584
|
};
|
|
4585
4585
|
|
|
4586
|
+
// src/silent-reply.ts
|
|
4587
|
+
function isSilentReplyText(text) {
|
|
4588
|
+
if (!text) return false;
|
|
4589
|
+
return /^\s*NO_REPLY\s*$/.test(text);
|
|
4590
|
+
}
|
|
4591
|
+
|
|
4586
4592
|
// src/reply-dispatcher.ts
|
|
4587
|
-
var import_plugin_sdk = require("openclaw/plugin-sdk");
|
|
4588
4593
|
function createCsdnReplyDispatcher(options) {
|
|
4589
4594
|
let sendChain = Promise.resolve();
|
|
4590
4595
|
let pending = 1;
|
|
@@ -4598,7 +4603,7 @@ function createCsdnReplyDispatcher(options) {
|
|
|
4598
4603
|
const text = payload?.text?.trim();
|
|
4599
4604
|
const media = payload?.mediaUrl || (Array.isArray(payload?.mediaUrls) && payload.mediaUrls.length > 0 ? payload.mediaUrls[0] : void 0);
|
|
4600
4605
|
if (!text && !media) return false;
|
|
4601
|
-
if (text &&
|
|
4606
|
+
if (text && isSilentReplyText(text)) return false;
|
|
4602
4607
|
queuedCounts[kind] += 1;
|
|
4603
4608
|
pending += 1;
|
|
4604
4609
|
sendChain = sendChain.then(async () => {
|
package/dist/index.js
CHANGED
|
@@ -4552,8 +4552,13 @@ var csdnOutbound = {
|
|
|
4552
4552
|
}
|
|
4553
4553
|
};
|
|
4554
4554
|
|
|
4555
|
+
// src/silent-reply.ts
|
|
4556
|
+
function isSilentReplyText(text) {
|
|
4557
|
+
if (!text) return false;
|
|
4558
|
+
return /^\s*NO_REPLY\s*$/.test(text);
|
|
4559
|
+
}
|
|
4560
|
+
|
|
4555
4561
|
// src/reply-dispatcher.ts
|
|
4556
|
-
import { isSilentReplyText } from "openclaw/plugin-sdk";
|
|
4557
4562
|
function createCsdnReplyDispatcher(options) {
|
|
4558
4563
|
let sendChain = Promise.resolve();
|
|
4559
4564
|
let pending = 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "csdn-im",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenClaw channel plugin for CSDN IM",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,11 +44,9 @@
|
|
|
44
44
|
"dev": "tsup --watch",
|
|
45
45
|
"test": "vitest --run"
|
|
46
46
|
},
|
|
47
|
-
"dependencies": {
|
|
48
|
-
"openclaw": ">=2026.3.0",
|
|
49
|
-
"zod": "^3.23.8"
|
|
50
|
-
},
|
|
51
47
|
"devDependencies": {
|
|
48
|
+
"openclaw": ">=2026.3.0",
|
|
49
|
+
"zod": "^3.23.8",
|
|
52
50
|
"@types/node": "^22.0.0",
|
|
53
51
|
"tsup": "^8.5.1",
|
|
54
52
|
"typescript": "^5.9.3",
|