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

Function setCachedUserInfo

admin_board/admin_board.ts:474–482  ·  view source on GitHub ↗
(
  target: TargetChat,
  user: Api.User,
)

Source from the content-addressed store, hash-verified

472async function getCachedUserInfo(
473 target: TargetChat,
474 userId: string,
475): Promise<{ name?: string; username?: string | null } | undefined> {
476 const entry = await getCachedAvgEntry(target, userId);
477 if (!entry) return undefined;
478 if (!entry.name && !entry.username) return undefined;
479 return {
480 name: entry.name,
481 username: entry.username,
482 };
483}
484
485async function clearAvgCache(target?: TargetChat): Promise<number> {

Callers 1

collectAdminStatFunction · 0.85

Calls 3

setCachedEntryFunction · 0.85
getUserIdStringFunction · 0.85
getUserDisplayNameFunction · 0.85

Tested by

no test coverage detected