Remove unused ActivityPub @context
values depending on response (#10378)
Fix #8078
This commit is contained in:
parent
a91acf79b5
commit
11fe293e1b
28 changed files with 234 additions and 60 deletions
|
@ -1,8 +1,13 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::ActorSerializer < ActiveModel::Serializer
|
||||
class ActivityPub::ActorSerializer < ActivityPub::Serializer
|
||||
include RoutingHelper
|
||||
|
||||
context :security
|
||||
|
||||
context_extensions :manually_approves_followers, :featured, :also_known_as,
|
||||
:moved_to, :property_value, :hashtag, :emoji
|
||||
|
||||
attributes :id, :type, :following, :followers,
|
||||
:inbox, :outbox, :featured,
|
||||
:preferred_username, :name, :summary,
|
||||
|
@ -16,7 +21,7 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer
|
|||
attribute :moved_to, if: :moved?
|
||||
attribute :also_known_as, if: :also_known_as?
|
||||
|
||||
class EndpointsSerializer < ActiveModel::Serializer
|
||||
class EndpointsSerializer < ActivityPub::Serializer
|
||||
include RoutingHelper
|
||||
|
||||
attributes :shared_inbox
|
||||
|
@ -124,7 +129,7 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer
|
|||
class CustomEmojiSerializer < ActivityPub::EmojiSerializer
|
||||
end
|
||||
|
||||
class TagSerializer < ActiveModel::Serializer
|
||||
class TagSerializer < ActivityPub::Serializer
|
||||
include RoutingHelper
|
||||
|
||||
attributes :type, :href, :name
|
||||
|
@ -142,7 +147,7 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer
|
|||
end
|
||||
end
|
||||
|
||||
class Account::FieldSerializer < ActiveModel::Serializer
|
||||
class Account::FieldSerializer < ActivityPub::Serializer
|
||||
attributes :type, :name, :value
|
||||
|
||||
def type
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue