move max_photo_size to environment variable

This commit is contained in:
2026-01-12 19:41:40 +03:00
parent 8fbc8e43db
commit 123bda888f
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -754,7 +754,7 @@ export function getRuntimeInfo(): RuntimeInfo {
export type PhotoMaxSize = { width: number, height: number, url: string; unique_file_id: string; };
export async function getPhotoMaxSize(photos: PhotoSize[], target: number = 1280): Promise<PhotoMaxSize | null> {
export async function getPhotoMaxSize(photos: PhotoSize[], target: number = Environment.MAX_PHOTO_SIZE): Promise<PhotoMaxSize | null> {
if (!photos) return null;
photos = photos.filter(p => Math.max(p.width, p.height) <= target);