fix(gifCollections): incorect treatment of all tenor url's as videos (#1191)

This commit is contained in:
Leon135 2026-06-19 21:30:08 +02:00 • committed by GitHub
parent 269f1c24f7
commit edf94a04e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,5 +11,5 @@ const videoExtensions = ["mp4", "ogg", "webm", "avi", "wmv", "flv", "mov", "mkv"
export function getFormat(url: string) {
const extension = getUrlExtension(url);
return url.startsWith("https://media.tenor") || extension == null || videoExtensions.includes(extension) ? Format.VIDEO : Format.IMAGE;
return extension != null && videoExtensions.includes(extension) ? Format.VIDEO : Format.IMAGE;
}