mirror of
https://github.com/mastodon/mastodon.git
synced 2026-03-27 12:55:32 -05:00
17 lines
345 B
Ruby
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
|