(fromId: string | undefined)
| 85 | * 格式:user123456 → 123456 |
| 86 | */ |
| 87 | export function extractPlatformId(fromId: string | undefined): string { |
| 88 | if (!fromId) return 'unknown' |
| 89 | // 移除 "user" / "channel" 等前缀,保留数字部分 |
| 90 | return fromId.replace(/^(user|channel)/, '') |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * 检测消息类型 |
no outgoing calls
no test coverage detected