Add account sensitized (#14361)

* Add account sensitized

* Fix i18n normalize

* Fix description and spec

* Fix spec

* Fix wording
This commit is contained in:
Takeshi Umeda
2020-11-05 04:45:01 +09:00
committed by GitHub
parent f90620b2f3
commit d6fe0c94ca
24 changed files with 136 additions and 13 deletions

View File

@ -58,6 +58,14 @@ class REST::StatusSerializer < ActiveModel::Serializer
end
end
def sensitive
if current_user? && current_user.account_id == object.account_id
object.sensitive
else
object.account.sensitized? || object.sensitive
end
end
def uri
ActivityPub::TagManager.instance.uri_for(object)
end