Fix #5118: has_large in posts API responses is sometimes nil

This commit is contained in:
evazion
2022-10-27 04:06:47 -05:00
parent 7953c2f091
commit 36b82f2b35

View File

@@ -188,7 +188,7 @@ class Post < ApplicationRecord
end
def is_image?
file_ext =~ /jpg|gif|png|webp|avif/i
file_ext.in?(%w[jpg gif png webp avif])
end
def is_flash?