fix: preserve Telegram usernames with underscores

This commit is contained in:
3252a8
2026-05-19 00:07:32 +03:00
parent 1d9f069f45
commit 3152631911
3 changed files with 37 additions and 6 deletions
+2 -2
View File
@@ -47,10 +47,10 @@ export function normalizedEmail(value) {
}
export function telegramName(profile, fallback) {
const username = String(profile?.username || "").trim();
if (username) return `@${username}`;
const first = String(profile?.first_name || "").trim();
const last = String(profile?.last_name || "").trim();
if (first || last) return `${first} ${last}`.trim();
const username = String(profile?.username || "").trim();
if (username) return `@${username}`;
return fallback;
}