(msg: Api.Message, text: string)
| 1309 | async function downloadCustomEmojiAnimatedPreferred(client: any, doc: any): Promise<Buffer | undefined> { |
| 1310 | const t0 = Date.now(); |
| 1311 | const id = String(doc?.id ?? doc?.documentId ?? doc?.document_id ?? ""); |
| 1312 | const mime = doc?.mimeType || doc?.mime_type || ""; |
| 1313 | const thumbs = customEmojiThumbs(doc); |
| 1314 | console.warn("quote emoji source scan", id, "docMime", mime, "thumbs", thumbs.map((t: any) => `${t?.className || t?.constructor?.name || typeof t}:${t?.type || ""}:${t?.size || ""}`).join(","), "mode", "skip-thumbs-use-original"); |
| 1315 | const td = Date.now(); |
| 1316 | const original = await rawDownloadDocument(client, doc).catch(() => undefined); |
| 1317 | console.warn("quote emoji source selected", id, "original", original?.length || 0, bufferKind(original), "downloadMs", quoteMs(td), "totalMs", quoteMs(t0)); |
| 1318 | return original; |
| 1319 | } |
| 1320 | function collectAnimatedMediaMessages(messages: any[]): any[] { |
| 1321 | const out: any[] = []; |
| 1322 | const scan = (message: any) => { |
| 1323 | if (!message) return; |
no test coverage detected