Skip to content

fix(wecombot): forward platform_message_id to dify and add debug logs#2

Merged
bjhx2003 merged 1 commit into
bjhx2003:masterfrom
hqhq2158-gif:feature/weCom-intelligent-root
Apr 18, 2026
Merged

fix(wecombot): forward platform_message_id to dify and add debug logs#2
bjhx2003 merged 1 commit into
bjhx2003:masterfrom
hqhq2158-gif:feature/weCom-intelligent-root

Conversation

@hqhq2158-gif
Copy link
Copy Markdown

概述 / Overview

修复并增强了企业微信智能机器人对接 Dify 的调试能力:

  • 将企微回调中的原始消息 ID 透传为 platform_message_id,随 Dify inputs 一起发送,便于在 Dify 中定位具体请求。
  • MessageReceivedPersonNormalMessageReceived 两个关键事件点增加精简 debug 日志,用于排查消息是否在进入 Dify 前被拦截。

This PR improves debugging for WeCom intelligent bot integration with Dify:

  • Forward the original WeCom callback message ID as platform_message_id into Dify inputs.
  • Add minimal debug logs around MessageReceived and PersonNormalMessageReceived to determine whether a message is intercepted before reaching Dify.

更改前后对比截图 / Screenshots

修改前 / Before:

  • 企业微信部分消息已进入 LangBot,但难以判断是否在进入 Dify 前被拦截。
  • Dify 侧无法直接拿到企微原始消息 ID。

修改后 / After:

  • Dify inputs 中可获取 platform_message_id
  • 日志中可明确看到:
    • MessageReceived ... prevented=...
    • PersonNormalMessageReceived ... prevented=...
      便于定位消息在哪个阶段被拦截。

检查清单 / Checklist

PR 作者完成 / For PR author

  • 阅读仓库贡献指引了吗? / Have you read the contribution guide?
  • 与项目所有者沟通过了吗? / Have you communicated with the project maintainer?
  • 我确定已自行测试此所作的更改,确保功能符合预期。 / I have tested the changes and ensured they work as expected.

项目维护者完成 / For project maintainer

  • 相关 issues 链接了吗? / Have you linked the related issues?
  • 配置项写好了吗?迁移写好了吗?生效了吗? / Have you written the configuration items? Have you written the migration? Has it taken effect?
  • 依赖加到 pyproject.toml 和 core/bootutils/deps.py 了吗? / Have you added the dependencies to pyproject.toml and core/bootutils/deps.py?
  • 文档编写了吗? / Have you written the documentation?

@bjhx2003 bjhx2003 merged commit f7a3627 into bjhx2003:master Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants