MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / parseContactAliases

Function parseContactAliases

packages/core/src/query/contact-queries.ts:472–482  ·  view source on GitHub ↗
(value: string | null)

Source from the content-addressed store, hash-verified

470}
471
472function parseContactAliases(value: string | null): string[] {
473 if (!value) return []
474 try {
475 const parsed = JSON.parse(value)
476 return Array.isArray(parsed)
477 ? parsed.filter((alias): alias is string => typeof alias === 'string' && alias.length > 0)
478 : []
479 } catch {
480 return []
481 }
482}
483function nonSystemContactMemberCondition(db: DatabaseAdapter, memberAlias: string): string {
484 // 系统消息名称会随平台和导出语言变化;联系人候选优先用稳定 sender identity 和消息类型识别伪成员。
485 return `(${nonSystemMemberIdentityCondition(db, memberAlias)}

Callers 1

mapContactMemberRowFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected