MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / tryDownload

Function tryDownload

quote/quote.ts:564–573  ·  view source on GitHub ↗
(isBig: boolean)

Source from the content-addressed store, hash-verified

562 const fwd: any = (msg as any).fwdFrom || (msg as any).fwd_from;
563 if (!fwd) return undefined;
564
565 const client: any = (msg as any).client;
566 const peer = fwdPeer(fwd);
567 const headerName = fwdHeaderName(fwd);
568
569 if (peer) {
570 const rawEntity = await getPeerEntity(client, peer);
571 const entity = await ensureFullEntity(client, rawEntity);
572 return { peer, entity, name: displayName(entity) || headerName || "Forwarded", anonymous: !entity && !!headerName };
573 }
574
575 if (headerName) return { name: headerName, anonymous: true };
576 return { anonymous: true };

Callers 1

downloadEntityAvatarFunction · 0.85

Calls 1

warnMethod · 0.80

Tested by

no test coverage detected