Hide translation button on posts unset languages

This commit is contained in:
KMY 2023-08-25 12:58:10 +09:00
parent 46ca43f4e8
commit b747d97b79

View file

@ -97,6 +97,10 @@ class REST::StatusSerializer < ActiveModel::Serializer
ActivityPub::TagManager.instance.url_for(object)
end
def language
object.language || (current_user? && current_user.locale)
end
def status_reference_ids
@status_reference_ids = object.reference_objects.pluck(:target_status_id)
end