Fix Telegram avatar proxy headers
All checks were successful
Build and deploy Backend / build (push) Successful in 35s
All checks were successful
Build and deploy Backend / build (push) Successful in 35s
This commit is contained in:
@@ -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()),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user