Remove Telegram API avatar logic from frontend service
This commit is contained in:
@@ -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),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user