Hide translation button on posts unset languages
This commit is contained in:
parent
46ca43f4e8
commit
b747d97b79
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue