Fix sensitive custom emoji posts
This commit is contained in:
parent
bed32b94d2
commit
c2ad822463
1 changed files with 5 additions and 0 deletions
|
@ -9,6 +9,7 @@ class REST::CustomEmojiSlimSerializer < ActiveModel::Serializer
|
|||
attribute :width, if: :width?
|
||||
attribute :height, if: :height?
|
||||
attribute :sensitive, if: :sensitive?
|
||||
attribute :is_sensitive, if: :sensitive?
|
||||
|
||||
def url
|
||||
full_asset_url(object.image.url)
|
||||
|
@ -49,4 +50,8 @@ class REST::CustomEmojiSlimSerializer < ActiveModel::Serializer
|
|||
def sensitive
|
||||
object.is_sensitive
|
||||
end
|
||||
|
||||
def is_sensitive # rubocop:disable Naming/PredicateName
|
||||
sensitive
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue