From f1351613775853f2a30d1c86a0fac28d99f72723 Mon Sep 17 00:00:00 2001 From: xwisenwang Date: Sun, 8 Mar 2026 09:51:02 +0800 Subject: [PATCH] fix: wecom bot callback message is xml --- pkg/channels/wecom/bot.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/channels/wecom/bot.go b/pkg/channels/wecom/bot.go index 96d5a961f..674236858 100644 --- a/pkg/channels/wecom/bot.go +++ b/pkg/channels/wecom/bot.go @@ -297,8 +297,9 @@ func (c *WeComBotChannel) handleMessageCallback(ctx context.Context, w http.Resp } // Parse decrypted JSON message (AIBOT uses JSON format) + // Reference: https://developer.work.weixin.qq.com/document/path/90968#%E4%B8%BE%E4%BE%8B%E8%AF%B4%E6%98%8E var msg WeComBotMessage - if err := json.Unmarshal([]byte(decryptedMsg), &msg); err != nil { + if err := xml.Unmarshal([]byte(decryptedMsg), &msg); err != nil { logger.ErrorCF("wecom", "Failed to parse decrypted message", map[string]any{ "error": err.Error(), })