You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mastodon/app/serializers/activitypub/activity_serializer.rb

21 lines
402 B
Ruby

# frozen_string_literal: true
class ActivityPub::ActivitySerializer < ActivityPub::Serializer
def self.serializer_for(model, options)
case model.class.name
when 'Status'
ActivityPub::NoteSerializer
else
super
end
end
attributes :id, :type, :actor, :published, :to, :cc
has_one :virtual_object, key: :object
def published
object.published.iso8601
end
end