Add custom emoji size recording and publish api

This commit is contained in:
KMY 2023-03-08 16:32:38 +09:00
parent 47bedd20ca
commit 92df4674ff
6 changed files with 36 additions and 2 deletions

View file

@ -9,6 +9,8 @@ class REST::EmojiReactionsGroupedByNameSerializer < ActiveModel::Serializer
attribute :url, if: :custom_emoji?
attribute :static_url, if: :custom_emoji?
attribute :domain, if: :custom_emoji?
attribute :width, if: :custom_emoji?
attribute :height, if: :custom_emoji?
attribute :account_ids, if: :account_ids?
def current_user?
@ -34,4 +36,12 @@ class REST::EmojiReactionsGroupedByNameSerializer < ActiveModel::Serializer
def domain
object.custom_emoji.domain
end
def width
object.custom_emoji.image_width
end
def height
object.custom_emoji.image_height
end
end