(text: string)
| 272 | async function ensureFullEntity(client: any, entity: any): Promise<any> { |
| 273 | if (!entity || !client) return entity; |
| 274 | // If entity has an id but no emojiStatus at all, it may be incomplete |
| 275 | if (entity.id && entity.emojiStatus === undefined && entity.emoji_status === undefined) { |
| 276 | try { |
| 277 | const full = await withTimeout(client.getEntity(entity), QUOTE_RPC_TIMEOUT_MS, "ensureFullEntity"); |
| 278 | return full || entity; |
| 279 | } catch { return entity; } |
| 280 | } |
| 281 | return entity; |
| 282 | } |
| 283 | |
| 284 | async function senderEntity(msg: any): Promise<any | undefined> { |
no outgoing calls
no test coverage detected