diff options
Diffstat (limited to 'app/models/custom_emoji.rb')
-rw-r--r-- | app/models/custom_emoji.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/custom_emoji.rb b/app/models/custom_emoji.rb index 33f59bc3d..5c3009824 100644 --- a/app/models/custom_emoji.rb +++ b/app/models/custom_emoji.rb @@ -27,6 +27,8 @@ class CustomEmoji < ApplicationRecord :(#{SHORTCODE_RE_FRAGMENT}): (?=[^[:alnum:]:]|$)/x + IMAGE_MIME_TYPES = %w(image/png image/gif).freeze + has_one :local_counterpart, -> { where(domain: nil) }, class_name: 'CustomEmoji', primary_key: :shortcode, foreign_key: :shortcode has_attached_file :image, styles: { static: { format: 'png', convert_options: '-coalesce' } } |