Add custom emoji size recording and publish api
This commit is contained in:
parent
47bedd20ca
commit
92df4674ff
6 changed files with 36 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue