Fix Telegram avatar proxy headers
All checks were successful
Build and deploy Backend / build (push) Successful in 35s

This commit is contained in:
Ruslan Bakiev
2026-05-08 20:01:32 +07:00
parent 387a504801
commit 6471d2ffcf
2 changed files with 5 additions and 1 deletions

View File

@@ -105,7 +105,9 @@ export async function fetchTelegramPhoto(fileId: string) {
}
return {
contentType: response.headers.get('content-type') ?? 'image/jpeg',
contentType: file.file_path.toLowerCase().endsWith('.png')
? 'image/png'
: 'image/jpeg',
bytes: Buffer.from(await response.arrayBuffer()),
};
}