Fix activity being rendered within activity due to caching (#11271)
Fix #11270
This commit is contained in:
parent
4e92183227
commit
6172263a63
|
@ -1,8 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ActivityPub::ActivitySerializer < ActivityPub::Serializer
|
class ActivityPub::ActivitySerializer < ActivityPub::Serializer
|
||||||
cache key: 'activity', expires_in: 3.minutes
|
|
||||||
|
|
||||||
attributes :id, :type, :actor, :published, :to, :cc
|
attributes :id, :type, :actor, :published, :to, :cc
|
||||||
|
|
||||||
has_one :proper, key: :object, serializer: ActivityPub::NoteSerializer, if: :serialize_object?
|
has_one :proper, key: :object, serializer: ActivityPub::NoteSerializer, if: :serialize_object?
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
class ActivityPub::ActorSerializer < ActivityPub::Serializer
|
class ActivityPub::ActorSerializer < ActivityPub::Serializer
|
||||||
include RoutingHelper
|
include RoutingHelper
|
||||||
|
|
||||||
cache key: 'actor', expires_in: 3.minutes
|
|
||||||
|
|
||||||
context :security
|
context :security
|
||||||
|
|
||||||
context_extensions :manually_approves_followers, :featured, :also_known_as,
|
context_extensions :manually_approves_followers, :featured, :also_known_as,
|
||||||
|
|
|
@ -7,8 +7,6 @@ class ActivityPub::CollectionSerializer < ActivityPub::Serializer
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
cache key: 'collection', expires_in: 3.minutes
|
|
||||||
|
|
||||||
attribute :id, if: -> { object.id.present? }
|
attribute :id, if: -> { object.id.present? }
|
||||||
attribute :type
|
attribute :type
|
||||||
attribute :total_items, if: -> { object.size.present? }
|
attribute :total_items, if: -> { object.size.present? }
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
class ActivityPub::EmojiSerializer < ActivityPub::Serializer
|
class ActivityPub::EmojiSerializer < ActivityPub::Serializer
|
||||||
include RoutingHelper
|
include RoutingHelper
|
||||||
|
|
||||||
cache key: 'emoji', expires_in: 3.minutes
|
|
||||||
|
|
||||||
context_extensions :emoji
|
context_extensions :emoji
|
||||||
|
|
||||||
attributes :id, :type, :name, :updated
|
attributes :id, :type, :name, :updated
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ActivityPub::NoteSerializer < ActivityPub::Serializer
|
class ActivityPub::NoteSerializer < ActivityPub::Serializer
|
||||||
cache key: 'note', expires_in: 3.minutes
|
|
||||||
|
|
||||||
context_extensions :atom_uri, :conversation, :sensitive,
|
context_extensions :atom_uri, :conversation, :sensitive,
|
||||||
:hashtag, :emoji, :focal_point, :blurhash
|
:hashtag, :emoji, :focal_point, :blurhash
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue