(value: string | null)
| 470 | } |
| 471 | |
| 472 | function 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 | } |
| 483 | function nonSystemContactMemberCondition(db: DatabaseAdapter, memberAlias: string): string { |
| 484 | // 系统消息名称会随平台和导出语言变化;联系人候选优先用稳定 sender identity 和消息类型识别伪成员。 |
| 485 | return `(${nonSystemMemberIdentityCondition(db, memberAlias)} |
no test coverage detected