openclaw-wechat-channel 0.4.4 → 0.5.0
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.mjs +6 -1
- package/package.json +13 -14
package/dist/index.mjs
CHANGED
|
@@ -181,8 +181,13 @@ async function handleWeChatMessage(params) {
|
|
|
181
181
|
log(`wechat: skipping duplicate message ${message.id}`);
|
|
182
182
|
return;
|
|
183
183
|
}
|
|
184
|
+
const selfWcId = account.wcId || message.recipient.id;
|
|
185
|
+
if (selfWcId && message.sender.id === selfWcId) {
|
|
186
|
+
log(`wechat[${accountId}]: ignoring self message`);
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
184
189
|
const allowUsers = account.allowUsers;
|
|
185
|
-
if (allowUsers && allowUsers.length > 0 &&
|
|
190
|
+
if (allowUsers && allowUsers.length > 0 && !allowUsers.includes(message.sender.id)) {
|
|
186
191
|
log(`wechat[${accountId}]: ignoring message from ${message.sender.id} (not in allowUsers)`);
|
|
187
192
|
if (account.wcId && !notifiedNonWhitelistUsers.has(message.sender.id)) {
|
|
188
193
|
notifiedNonWhitelistUsers.add(message.sender.id);
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openclaw-wechat-channel",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@10.30.0",
|
|
4
|
+
"version": "0.5.0",
|
|
6
5
|
"description": "OpenClaw WeChat channel plugin via Proxy API",
|
|
7
6
|
"license": "MIT",
|
|
8
7
|
"repository": {
|
|
@@ -49,17 +48,6 @@
|
|
|
49
48
|
"defaultChoice": "npm"
|
|
50
49
|
}
|
|
51
50
|
},
|
|
52
|
-
"scripts": {
|
|
53
|
-
"build": "tsdown",
|
|
54
|
-
"lint": "eslint .",
|
|
55
|
-
"lint:fix": "eslint . --fix",
|
|
56
|
-
"test": "vitest run",
|
|
57
|
-
"test:unit": "vitest run test/unit",
|
|
58
|
-
"test:integration": "vitest run test/integration",
|
|
59
|
-
"test:watch": "vitest",
|
|
60
|
-
"typecheck": "tsc --noEmit",
|
|
61
|
-
"release": "bumpp && npm publish"
|
|
62
|
-
},
|
|
63
51
|
"peerDependencies": {
|
|
64
52
|
"openclaw": ">=2026.2.9"
|
|
65
53
|
},
|
|
@@ -75,5 +63,16 @@
|
|
|
75
63
|
"typescript": "^5.9.3",
|
|
76
64
|
"vitest": "^4.0.18",
|
|
77
65
|
"zod": "^4.3.6"
|
|
66
|
+
},
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "tsdown",
|
|
69
|
+
"lint": "eslint .",
|
|
70
|
+
"lint:fix": "eslint . --fix",
|
|
71
|
+
"test": "vitest run",
|
|
72
|
+
"test:unit": "vitest run test/unit",
|
|
73
|
+
"test:integration": "vitest run test/integration",
|
|
74
|
+
"test:watch": "vitest",
|
|
75
|
+
"typecheck": "tsc --noEmit",
|
|
76
|
+
"release": "bumpp && npm publish"
|
|
78
77
|
}
|
|
79
|
-
}
|
|
78
|
+
}
|