Make storing and displaying application used to toot opt-in
This commit is contained in:
@@ -14,7 +14,7 @@ class REST::StatusSerializer < ActiveModel::Serializer
|
||||
attribute :local_only if :local?
|
||||
|
||||
belongs_to :reblog, serializer: REST::StatusSerializer
|
||||
belongs_to :application
|
||||
belongs_to :application, if: :user_shows_application?
|
||||
belongs_to :account, serializer: REST::AccountSerializer
|
||||
|
||||
has_many :media_attachments, serializer: REST::MediaAttachmentSerializer
|
||||
@@ -40,6 +40,10 @@ class REST::StatusSerializer < ActiveModel::Serializer
|
||||
!current_user.nil?
|
||||
end
|
||||
|
||||
def user_shows_application?
|
||||
object.account.user_shows_application?
|
||||
end
|
||||
|
||||
def visibility
|
||||
# This visibility is masked behind "private"
|
||||
# to avoid API changes because there are no
|
||||
|
||||
Reference in New Issue
Block a user