Remove Telegram API avatar logic from frontend service

This commit is contained in:
Ruslan Bakiev
2026-02-23 08:24:04 +07:00
parent cbc2a3b31b
commit cd2267e9d3
3 changed files with 12 additions and 91 deletions

View File

@@ -72,12 +72,6 @@ type ContactProfile = {
avatarUrl: string | null;
};
function toTelegramAvatarProxyUrl(externalContactId: string) {
const id = String(externalContactId ?? "").trim();
if (!/^\d+$/.test(id)) return null;
return `/api/omni/telegram/avatar/${id}`;
}
function buildContactProfile(
normalized: OmniInboundEnvelopeV1["payloadNormalized"],
externalContactId: string,
@@ -105,7 +99,7 @@ function buildContactProfile(
return {
displayName,
avatarUrl: asString(normalized.contactAvatarUrl) ?? toTelegramAvatarProxyUrl(externalContactId),
avatarUrl: asString(normalized.contactAvatarUrl),
};
}