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

Function getUserDisplayName

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

Source from the content-addressed store, hash-verified

229 return `目标对话: <b>${htmlEscape(target.titleDisplay)}</b>${
230 target.username ? ` <code>${htmlEscape(target.username)}</code>` : ""
231 }`;
232}
233
234function buildUserDisplay(user: Api.User): string {
235 const parts: string[] = [];
236 const userId = getUserIdString(user);
237 const displayName = getUserDisplayName(user).trim();
238 const usernameText = user.username || "";
239
240 if (displayName && displayName !== userId && displayName !== usernameText) {
241 parts.push(htmlEscape(displayName));

Callers 3

buildUserDisplayFunction · 0.85
setCachedUserInfoFunction · 0.85
collectAdminStatFunction · 0.85

Calls 1

getUserIdStringFunction · 0.85

Tested by

no test coverage detected