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

Function buildUserDisplay

admin_board/admin_board.ts:246–261  ·  view source on GitHub ↗
(user: Api.User)

Source from the content-addressed store, hash-verified

244 parts.push(`<code>${htmlEscape(user.username)}</code>`);
245 }
246 parts.push(`<a href="tg://user?id=${userId}">${userId}</a>`);
247
248 return parts.join(" ");
249}
250
251function buildUserDisplayFromId(userId: string): string {
252 return `<a href="tg://user?id=${userId}">${htmlEscape(userId)}</a>`;
253}
254
255function buildUserDisplayFromCache(
256 userId: string,
257 cachedUser?: { name?: string; username?: string | null },
258): string {
259 if (!cachedUser) {
260 return buildUserDisplayFromId(userId);
261 }
262
263 const parts: string[] = [];
264 const displayName = (cachedUser.name || "").trim();

Callers 2

handleSeatActionFunction · 0.85
handleTrimActionFunction · 0.85

Calls 3

getUserIdStringFunction · 0.85
getUserDisplayNameFunction · 0.85
htmlEscapeFunction · 0.70

Tested by

no test coverage detected