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

Function getDisplayName

pmcaptcha/pmcaptcha.ts:389–397  ·  view source on GitHub ↗
(client: TelegramClient, userId: number)

Source from the content-addressed store, hash-verified

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
396async 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;

Callers 5

sendCaptchaFunction · 0.70
handleReplyFunction · 0.70
executeBlockActionsFunction · 0.70
messageListenerFunction · 0.70
pmcaptchaFunction · 0.70

Calls 2

fetchUserInfoFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected