Add missing FeaturedCollection vocabulary to contexts (#39251)
This commit is contained in:
parent
4cbea7f5a4
commit
8b18195075
@ -42,6 +42,7 @@ module ContextHelper
|
|||||||
interaction_policies: {
|
interaction_policies: {
|
||||||
'gts' => 'https://gotosocial.org/ns#',
|
'gts' => 'https://gotosocial.org/ns#',
|
||||||
'interactionPolicy' => { '@id' => 'gts:interactionPolicy', '@type' => '@id' },
|
'interactionPolicy' => { '@id' => 'gts:interactionPolicy', '@type' => '@id' },
|
||||||
|
'canFeature' => { '@id' => 'https://w3id.org/fep/7aa9#canFeature', '@type' => '@id' },
|
||||||
'canQuote' => { '@id' => 'gts:canQuote', '@type' => '@id' },
|
'canQuote' => { '@id' => 'gts:canQuote', '@type' => '@id' },
|
||||||
'automaticApproval' => { '@id' => 'gts:automaticApproval', '@type' => '@id' },
|
'automaticApproval' => { '@id' => 'gts:automaticApproval', '@type' => '@id' },
|
||||||
'manualApproval' => { '@id' => 'gts:manualApproval', '@type' => '@id' },
|
'manualApproval' => { '@id' => 'gts:manualApproval', '@type' => '@id' },
|
||||||
@ -52,6 +53,22 @@ module ContextHelper
|
|||||||
'interactingObject' => { '@id' => 'gts:interactingObject', '@type' => '@id' },
|
'interactingObject' => { '@id' => 'gts:interactingObject', '@type' => '@id' },
|
||||||
'interactionTarget' => { '@id' => 'gts:interactionTarget', '@type' => '@id' },
|
'interactionTarget' => { '@id' => 'gts:interactionTarget', '@type' => '@id' },
|
||||||
},
|
},
|
||||||
|
feature_requests: { 'FeatureRequest' => 'https://w3id.org/fep/7aa9#FeatureRequest' },
|
||||||
|
featured_collections: {
|
||||||
|
'FeaturedCollection' => 'https://w3id.org/fep/7aa9#FeaturedCollection',
|
||||||
|
'FeaturedItem' => 'https://w3id.org/fep/7aa9#FeaturedItem',
|
||||||
|
'FeatureRequest' => 'https://w3id.org/fep/7aa9#FeatureRequest',
|
||||||
|
'FeatureAuthorization' => 'https://w3id.org/fep/7aa9#FeatureAuthorization',
|
||||||
|
'topic' => { '@id' => 'https://w3id.org/fep/7aa9#topic', '@type' => '@id' },
|
||||||
|
'featuredObject' => { '@id' => 'https://w3id.org/fep/7aa9#featuredObject', '@type' => '@id' },
|
||||||
|
'featureAuthorization' => { '@id' => 'https://w3id.org/fep/7aa9#featureAuthorization', '@type' => '@id' },
|
||||||
|
},
|
||||||
|
feature_authorizations: {
|
||||||
|
'gts' => 'https://gotosocial.org/ns#',
|
||||||
|
'FeatureAuthorization' => 'https://w3id.org/fep/7aa9#FeatureAuthorization',
|
||||||
|
'interactingObject' => { '@id' => 'gts:interactingObject', '@type' => '@id' },
|
||||||
|
'interactionTarget' => { '@id' => 'gts:interactionTarget', '@type' => '@id' },
|
||||||
|
},
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
def full_context
|
def full_context
|
||||||
|
|||||||
@ -3,6 +3,8 @@
|
|||||||
class ActivityPub::FeatureAuthorizationSerializer < ActivityPub::Serializer
|
class ActivityPub::FeatureAuthorizationSerializer < ActivityPub::Serializer
|
||||||
include RoutingHelper
|
include RoutingHelper
|
||||||
|
|
||||||
|
context_extensions :feature_authorizations
|
||||||
|
|
||||||
attributes :id, :type, :interacting_object, :interaction_target
|
attributes :id, :type, :interacting_object, :interaction_target
|
||||||
|
|
||||||
def id
|
def id
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ActivityPub::FeatureRequestSerializer < ActivityPub::Serializer
|
class ActivityPub::FeatureRequestSerializer < ActivityPub::Serializer
|
||||||
|
context_extensions :feature_requests
|
||||||
|
|
||||||
attributes :id, :type, :instrument
|
attributes :id, :type, :instrument
|
||||||
attribute :virtual_object, key: :object
|
attribute :virtual_object, key: :object
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ActivityPub::FeaturedCollectionSerializer < ActivityPub::Serializer
|
class ActivityPub::FeaturedCollectionSerializer < ActivityPub::Serializer
|
||||||
|
context_extensions :discoverable, :featured_collections, :hashtag, :sensitive
|
||||||
|
|
||||||
attributes :id, :type, :total_items, :name, :attributed_to, :url,
|
attributes :id, :type, :total_items, :name, :attributed_to, :url,
|
||||||
:sensitive, :discoverable, :published, :updated
|
:sensitive, :discoverable, :published, :updated
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,8 @@
|
|||||||
class ActivityPub::FeaturedItemSerializer < ActivityPub::Serializer
|
class ActivityPub::FeaturedItemSerializer < ActivityPub::Serializer
|
||||||
include RoutingHelper
|
include RoutingHelper
|
||||||
|
|
||||||
|
context_extensions :featured_collections
|
||||||
|
|
||||||
attributes :id, :type, :featured_object, :feature_authorization, :published
|
attributes :id, :type, :featured_object, :feature_authorization, :published
|
||||||
|
|
||||||
def id
|
def id
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user