Change visibility to visibility_ex
This commit is contained in:
parent
b18268a0a0
commit
7d76d01795
11 changed files with 31 additions and 25 deletions
|
@ -4,7 +4,7 @@ class REST::StatusSerializer < ActiveModel::Serializer
|
|||
include FormattingHelper
|
||||
|
||||
attributes :id, :created_at, :in_reply_to_id, :in_reply_to_account_id,
|
||||
:sensitive, :spoiler_text, :visibility, :language, :translatable,
|
||||
:sensitive, :spoiler_text, :visibility, :visibility_ex, :language, :translatable,
|
||||
:uri, :url, :replies_count, :reblogs_count, :searchability,
|
||||
:favourites_count, :emoji_reactions, :edited_at
|
||||
|
||||
|
@ -60,11 +60,17 @@ class REST::StatusSerializer < ActiveModel::Serializer
|
|||
# UX differences
|
||||
if object.limited_visibility?
|
||||
'private'
|
||||
elsif object.public_unlisted_visibility?
|
||||
'public'
|
||||
else
|
||||
object.visibility
|
||||
end
|
||||
end
|
||||
|
||||
def visibility_ex
|
||||
object.visibility
|
||||
end
|
||||
|
||||
def searchability
|
||||
object.compute_searchability
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue