Skip to content

Commit b5dd3d8

Browse files
author
王允
committed
删除多余的微信参数
1 parent 38891e9 commit b5dd3d8

7 files changed

Lines changed: 14 additions & 27 deletions

File tree

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,6 @@ The plugin supports OpenAI-compatible API providers. If not configured in the pl
377377
|-------|------|----------|---------|-------------|
378378
| `enabled` | boolean | No | `true` | Enable WeChat notifications via @tencent-weixin/openclaw-weixin plugin |
379379
| `receiver_id` | string | No | Auto-detect | WeChat receiver ID (format: `xxx@im.wechat`) |
380-
| `bot_account_id` | string | No | - | WeChat bot account ID (format: `xxx-im-bot`) |
381380

382381
**receiver_id Auto-Detection:**
383382

@@ -390,7 +389,7 @@ The plugin will automatically detect `receiver_id` using the following priority
390389
5. **OpenClaw Config**: Search WeChat plugin configuration and sessions
391390

392391
**⚠️ Important:**
393-
- WeChat ID is **case-sensitive**, e.g., `o9cq806Il_QmHA022BUNXe0hUv4I@im.wechat`
392+
- WeChat ID is **case-sensitive**, e.g., `xxx@im.wechat`
394393
- If auto-detection fails, detailed configuration guide will be shown
395394

396395
**WeChat Requirements:**
@@ -423,7 +422,7 @@ The plugin will automatically detect `receiver_id` using the following priority
423422
"channels": {
424423
"wechat": {
425424
"enabled": true,
426-
"receiver_id": "o9cq806Il_QmHA022BUNXe0hUv4I@im.wechat"
425+
"receiver_id": "xxx@im.wechat"
427426
}
428427
}
429428
}
@@ -449,7 +448,7 @@ openclaw message send --channel openclaw-weixin --target "your-wechat-id" "test"
449448
```
450449

451450
**⚠️ Notes:**
452-
- WeChat ID format: `o9cq806Il_QmHA022BUNXe0hUv4I@im.wechat` (case-sensitive!)
451+
- WeChat ID format: `xxx@im.wechat` (case-sensitive!)
453452
- If auto-detection fails, error message includes detailed configuration guide
454453

455454
*Required when using this channel

README_CN.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ openclaw plugins install openclaw-github-trending
100100
},
101101
"wechat": {
102102
"enabled": true,
103-
"receiver_id": "your-wechat-user-id@im.wechat", // 可选:微信用户 ID,不配置会尝试自动获取
104-
"bot_account_id": "your-bot-account-id-im-bot" // 可选:微信机器人账号 ID
103+
"receiver_id": "your-wechat-user-id@im.wechat" // 可选:微信用户 ID,不配置会尝试自动获取
105104
}
106105
},
107106
// 可选:开启历史记录功能,用于智能去重
@@ -380,7 +379,6 @@ openclaw cron rm <job-id>
380379
|-------|------|----------|---------|-------------|
381380
| `enabled` | boolean || `true` | 通过 @tencent-weixin/openclaw-weixin 插件启用微信通知 |
382381
| `receiver_id` | string || 自动获取 | 微信接收者 ID(格式:`xxx@im.wechat`|
383-
| `bot_account_id` | string || - | 微信机器人账号 ID(格式:`xxx-im-bot`|
384382

385383
**receiver_id 自动获取机制:**
386384

@@ -393,7 +391,7 @@ openclaw cron rm <job-id>
393391
5. **OpenClaw 配置**:从微信插件的配置和会话中查找
394392

395393
**⚠️ 重要提示:**
396-
- 微信 ID **区分大小写**,例如:`o9cq806Il_QmHA022BUNXe0hUv4I@im.wechat`
394+
- 微信 ID **区分大小写**,例如:`xxx@im.wechat`
397395
- 如果自动获取失败,会显示详细的配置指南和获取方法
398396

399397
**微信推送配置要求:**
@@ -452,7 +450,7 @@ openclaw message send --channel openclaw-weixin --target "你的微信 ID" "测
452450
```
453451

454452
**⚠️ 注意事项:**
455-
- 微信 ID 格式:`o9cq806Il_QmHA022BUNXe0hUv4I@im.wechat`(区分大小写!)
453+
- 微信 ID 格式:`xxx@im.wechat`(区分大小写!)
456454
- 如果自动获取失败,错误信息会包含详细的配置指南
457455

458456
"enable_login": true
@@ -464,8 +462,7 @@ openclaw message send --channel openclaw-weixin --target "你的微信 ID" "测
464462
"channels": {
465463
"wechat": {
466464
"enabled": true,
467-
"receiver_id": "xxx@im.wechat",
468-
"bot_account_id": "xxx-im-bot"
465+
"receiver_id": "xxx@im.wechat"
469466
}
470467
}
471468
}
@@ -476,8 +473,8 @@ openclaw message send --channel openclaw-weixin --target "你的微信 ID" "测
476473
```
477474
478475
3. **配置方式(三选一)**:
479-
- **配置文件(推荐)**:在 `openclaw.json` 的 `wechat` 配置中设置 `receiver_id` 和 `bot_account_id`
480-
- **环境变量**:设置 `OPENCLAW_WECHAT_RECEIVER_ID` 和 `OPENCLAW_WECHAT_BOT_ACCOUNT_ID`
476+
- **配置文件(推荐)**:在 `openclaw.json` 的 `wechat` 配置中设置 `receiver_id`
477+
- **环境变量**:设置 `OPENCLAW_WECHAT_RECEIVER_ID`
481478
- **默认值**:使用内置默认配置(仅用于测试)
482479
483480
4. **登录微信**:

openclaw.plugin.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "openclaw-github-trending",
33
"name": "GitHub Trending",
4-
"version": "1.4.3",
4+
"version": "1.4.4",
55
"description": "Fetch GitHub trending repositories and push to Feishu or Email with AI summaries",
66
"author": "王允",
77
"license": "MIT",
@@ -126,10 +126,6 @@
126126
"type": "string",
127127
"description": "WeChat user ID to receive messages"
128128
},
129-
"bot_account_id": {
130-
"type": "string",
131-
"description": "WeChat bot account ID"
132-
},
133129
"channel_name": {
134130
"type": "string",
135131
"description": "WeChat channel name for messages"

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openclaw-github-trending",
3-
"version": "1.4.3",
3+
"version": "1.4.4",
44
"description": "OpenClaw plugin for fetching GitHub trending repositories and pushing to Feishu or Email with AI summaries",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/channels/wechat.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const logger = Logger.get('WeChatChannel');
1010
export interface WeChatConfig {
1111
enabled?: boolean;
1212
receiver_id?: string;
13-
bot_account_id?: string;
1413
channel_name?: string;
1514
}
1615

@@ -218,14 +217,12 @@ export class WeChatChannel {
218217
};
219218
}
220219

221-
const botAccountId = config.bot_account_id || process.env.OPENCLAW_WECHAT_BOT_ACCOUNT_ID;
222-
223220
logger.info('Sending WeChat message', {
224221
receiverId: receiverId ? `${receiverId.substring(0, 4)}****` : 'not set',
225222
contentLength: content.length
226223
});
227224

228-
const result = await this.sendViaCli(content, receiverId, botAccountId, channelName);
225+
const result = await this.sendViaCli(content, receiverId, channelName);
229226

230227
const duration = Date.now() - startTime;
231228
if (result.success) {
@@ -389,7 +386,6 @@ export class WeChatChannel {
389386
private static async sendViaCli(
390387
content: string,
391388
to: string,
392-
accountId: string | undefined,
393389
channelName: string
394390
): Promise<PushResult> {
395391
try {

src/models/config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export interface EmailConfig {
4444
export interface WeChatConfig {
4545
enabled?: boolean; // Plugin enabled status (controlled by OpenClaw plugin system)
4646
receiver_id?: string; // WeChat user ID to receive messages
47-
bot_account_id?: string; // WeChat bot account ID
4847
channel_name?: string; // OpenClaw channel name, defaults to 'openclaw-weixin'
4948
}
5049

0 commit comments

Comments
 (0)