(client: TelegramClient, userId: number)
| 387 | if (directPeer) cacheInputPeer(userId, directPeer); |
| 388 | if (inputPeerCache.has(userId)) return; |
| 389 | |
| 390 | try { |
| 391 | const peer = await (message as any).getInputChat?.(); |
| 392 | cacheInputPeer(userId, peer); |
| 393 | } catch {} |
| 394 | } |
| 395 | |
| 396 | async function fetchUserInfo(client: TelegramClient, userId: number): Promise<any | null> { |
| 397 | try { |
| 398 | const e = await client.getEntity(userId) as any; |
| 399 | cacheUserFromSender(e); |
| 400 | return e; |
no test coverage detected