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 <noreply@anthropic.com>
This commit is contained in:
parent
61b2778ff0
commit
f1bf0a6abc
|
|
@ -607,11 +607,6 @@ export class WecomRouterService implements OnModuleInit, OnModuleDestroy {
|
||||||
);
|
);
|
||||||
return;
|
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)) {
|
if (!this.rateAllow(msg.externalUserId)) {
|
||||||
await this.sendMessage(msg.externalUserId, '消息频率过高,请稍后再试(每分钟最多10条)。');
|
await this.sendMessage(msg.externalUserId, '消息频率过高,请稍后再试(每分钟最多10条)。');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue