1
0
Fork 0
forked from gitea/nas

Merge remote-tracking branch 'origin/kb_development' into kb_migration

This commit is contained in:
KMY 2023-04-06 16:57:01 +09:00
commit 94cd200097
50 changed files with 801 additions and 66 deletions

View file

@ -5,7 +5,7 @@ class REST::StatusSerializer < ActiveModel::Serializer
attributes :id, :created_at, :in_reply_to_id, :in_reply_to_account_id,
:sensitive, :spoiler_text, :visibility, :language,
:uri, :url, :replies_count, :reblogs_count,
:uri, :url, :replies_count, :reblogs_count, :searchability,
:favourites_count, :emoji_reactions, :edited_at
attribute :favourited, if: :current_user?
@ -61,6 +61,10 @@ class REST::StatusSerializer < ActiveModel::Serializer
end
end
def searchability
object.compute_searchability
end
def sensitive
if current_user? && current_user.account_id == object.account_id
object.sensitive