(user: any, userId: number)
| 357 | } |
| 358 | |
| 359 | return undefined; |
| 360 | } |
| 361 | |
| 362 | /** |
| 363 | * 按用户数字 ID 解析 InputPeer。 |
| 364 | * 目标不必在当前聊天:本地缓存 → 当前群 → 跨管理群 getParticipant → 频道 accessHash=0 试探。 |
| 365 | */ |
| 366 | private static async resolveNumericUser( |
| 367 | client: TelegramClient, |
| 368 | message: Api.Message, |
| 369 | userId: number, |
| 370 | ): Promise<{ user: any; participant?: any }> { |
| 371 | let entity = await this.safeGetEntity(client, userId); |
| 372 | let participant = entity |
| 373 | ? await this.safeGetInputEntity(client, entity) |
| 374 | : await this.safeGetInputEntity(client, userId); |
| 375 | |
| 376 | if (!participant) { |
no outgoing calls
no test coverage detected