From f1bf0a6abc2498f7bfad4500e7cf2d6b09630049 Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 10 Mar 2026 07:02:07 -0700 Subject: [PATCH] fix(wecom): remove 6-char hex false-positive intercept The /^[0-9A-F]{6}$/ check in handleMessage intercepted any message that happened to be 6 uppercase hex chars (e.g. colour codes, words like FACADE) and told the user their binding code was expired. Removed: non-matching resolveBindCode result now falls through to normal agent routing, matching the original behaviour. Co-Authored-By: Claude Sonnet 4.6 --- .../src/infrastructure/wecom/wecom-router.service.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/services/agent-service/src/infrastructure/wecom/wecom-router.service.ts b/packages/services/agent-service/src/infrastructure/wecom/wecom-router.service.ts index 611f024..3090f1d 100644 --- a/packages/services/agent-service/src/infrastructure/wecom/wecom-router.service.ts +++ b/packages/services/agent-service/src/infrastructure/wecom/wecom-router.service.ts @@ -607,11 +607,6 @@ export class WecomRouterService implements OnModuleInit, OnModuleDestroy { ); return; } - // 6-char hex pattern but not a valid code → tell user it's expired - if (/^[0-9A-F]{6}$/.test(upperText)) { - await this.sendMessage(msg.externalUserId, '验证码无效或已过期,请重新在 IT0 App 中生成新的验证码。'); - return; - } if (!this.rateAllow(msg.externalUserId)) { await this.sendMessage(msg.externalUserId, '消息频率过高,请稍后再试(每分钟最多10条)。');