openclaw - ✅(Solved) Fix WeChat plugin does not support proactive sending messages, BOOT.md scenario cannot be used [3 pull requests, 3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#52153Fetched 2026-04-08 01:15:00
View on GitHub
Comments
3
Participants
3
Timeline
7
Reactions
0
Timeline (top)
cross-referenced ×4commented ×3

Error Message

  1. Error: sendWeixinOutbound: contextToken is required

PR fix notes

PR #843: fix(wechat): Unable to select WeChat as the notification channel for scheduled tasks

Description (problem / solution / changelog)

[问题] 调度任务中无法选择微信作为channel进行通知

[根因] 在channel 支持微信 后出现。定时调度本身允许选择的channel是有白名单的,其在 文件 src/main/main.ts 中通过 SCHEDULED_TASK_CHANNEL_OPTIONS 声明。添加微信为新channel后,这个名单未更新,导致界面上无法选择wechat

[修复] 在 SCHEDULED_TASK_CHANNEL_OPTIONS 列表中新增了 wechat 配置,后续新增了channel 这里都需要添加

[复现路径](可选) <img width="953" height="944" alt="image" src="https://github.com/user-attachments/assets/a7893423-f9a5-4bd7-9958-e6f4af804a76" />

Changed files

  • src/main/main.ts (modified, +7/-6)

PR #58125: docs(i18n): 添加中文部署指南(智谱GLM/通义/豆包 + 微信接入)

Description (problem / solution / changelog)

Summary

  • Adds a comprehensive Chinese deployment guide in docs/zh-CN/install/chinese-deployment-guide.md
  • Covers domestic npm mirror acceleration, Zhipu GLM / Tongyi / Doubao setup via Anthropic-compatible API, and full WeChat channel setup via @tencent-weixin/openclaw-weixin
  • Honestly documents the current reply-only limitation (no proactive push for Cron/BOOT.md)

Related

  • Enhances i18n efforts tracked in #3460
  • Related to #52099 (WeChat docs), #52153 (reply-only limitation), #57619 (subagent delivery issue)

Testing

  • Verified with OpenClaw v2026.3.28 + openclaw-weixin 2.0.x in China network
  • All commands tested locally
  • Follows existing zh-CN style and Mintlify YAML front-matter format

Changed files

  • docs/zh-CN/install/chinese-deployment-guide.md (added, +261/-0)
RAW_BUFFERClick to expand / collapse

Scenario: After gateway restart, automatically send WeChat message to notify user "ready" via BOOT.md

Problem:

  1. boot-md triggers message tool to send WeChat message and fails
  2. Error: sendWeixinOutbound: contextToken is required
  3. Reason: WeChat sending requires contextToken (session context token), but boot-md is headless startup without active session, cannot obtain contextToken
  4. QQ plugin supports proactive sending via dmPolicy configuration, but WeChat plugin lacks similar configuration

Expected:

  1. WeChat plugin supports dmPolicy configuration like QQ to allow proactive message sending
  2. Or automatically obtain/create session when no contextToken
  3. Or provide another way to send WeChat messages in BOOT.md

Environment:

  • OpenClaw version: latest
  • WeChat plugin: @tencent-weixin/openclaw-weixin v1.0.2

extent analysis

Fix Plan

To resolve the issue, we will modify the WeChat plugin to support dmPolicy configuration for proactive message sending.

Code Changes

We will update the @tencent-weixin/openclaw-weixin plugin to include a dmPolicy configuration option. Here's an example of the changes:

// WeChat plugin configuration
const wechatConfig = {
  // ... existing configurations ...
  dmPolicy: {
    enabled: true,
    tokenObtainUrl: 'https://example.com/token', // URL to obtain contextToken
  },
};

// Update the sendWeixinOutbound function to use dmPolicy
function sendWeixinOutbound(message) {
  if (wechatConfig.dmPolicy.enabled) {
    // Obtain contextToken using the tokenObtainUrl
    const contextToken = obtainContextToken(wechatConfig.dmPolicy.tokenObtainUrl);
    // Send the message using the obtained contextToken
    sendWeixinMessage(message, contextToken);
  } else {
    // Fallback to existing behavior
    sendWeixinMessage(message);
  }
}

// Helper function to obtain contextToken
function obtainContextToken(tokenObtainUrl) {
  // Implement logic to obtain contextToken from the tokenObtainUrl
  // For example, using Axios to make a GET request
  const response = await axios.get(tokenObtainUrl);
  return response.data.contextToken;
}

Verification

To verify the fix, restart the gateway and check if the WeChat message is sent successfully. You can also test the dmPolicy configuration by setting enabled to false and verifying that the message is not sent.

Extra Tips

  • Make sure to update the @tencent-weixin/openclaw-weixin plugin to the latest version after applying the fix.
  • If you're using a custom token obtain URL, ensure it's correctly configured and returns a valid contextToken.
  • Consider adding error handling and logging to the obtainContextToken function to handle cases where the token obtain URL is unreachable or returns an invalid response.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING