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

Function downloadSenderAvatar

quote/quote.ts:581–583  ·  view source on GitHub ↗
(msg: Api.Message, entity?: any)

Source from the content-addressed store, hash-verified

579function stableEntityKey(entity: any): string | undefined {
580 const raw = entity?.id ?? entity?.userId ?? entity?.channelId ?? entity?.chatId ?? entity?.accessHash ?? entity;
581 if (!raw) return undefined;
582 try { return typeof raw === "bigint" ? raw.toString() : JSON.stringify(raw, (_, v) => typeof v === "bigint" ? v.toString() : v); } catch (_) { return String(raw); }
583}
584
585async function getPeerEntity(client: any, peer: any): Promise<any | undefined> {
586 if (!client || !peer) return undefined;

Callers 1

toQuoteMessageFunction · 0.85

Calls 2

downloadEntityAvatarFunction · 0.85
senderEntityFunction · 0.85

Tested by

no test coverage detected