mastodon/app/serializers/activitypub/outbox_serializer.rb
2026-02-05 09:39:27 +00:00

17 lines
345 B
Ruby

# frozen_string_literal: true
class ActivityPub::OutboxSerializer < ActivityPub::CollectionSerializer
def self.serializer_for(model, options)
case model
when Status
model.reblog? ? ActivityPub::AnnounceNoteSerializer : ActivityPub::CreateNoteSerializer
else
super
end
end
def items
object.items
end
end