031c6e086a
Extract schedule, greeting/status/connectivity replies, chat-general prompt, and display-name helpers from wechat-mp.mjs. Route sync intents via classifyWechatIntent and add channel isolation CI check. Co-authored-by: Cursor <cursoragent@cursor.com>
10 lines
313 B
JavaScript
10 lines
313 B
JavaScript
export function normalizeWechatName(value) {
|
|
const name = String(value ?? '').trim();
|
|
if (!name || /^wx_[a-z0-9_]{4,64}$/i.test(name)) return '';
|
|
return name;
|
|
}
|
|
|
|
export function resolveWechatAddressName(user) {
|
|
return normalizeWechatName(user?.nickname) || normalizeWechatName(user?.displayName) || '';
|
|
}
|