# frozen_string_literal: true
class ActivityPub::DeleteSerializer < ActiveModel::Serializer
class TombstoneSerializer < ActiveModel::Serializer
attributes :id, :type
attribute :atom_uri, key: '_:atomUri'
def id
ActivityPub::TagManager.instance.uri_for(object)
end
def type
'Tombstone'
def atom_uri
::TagManager.instance.uri_for(object)
attributes :id, :type, :actor
has_one :object, serializer: TombstoneSerializer
[ActivityPub::TagManager.instance.uri_for(object), '#delete'].join
'Delete'
def actor
ActivityPub::TagManager.instance.uri_for(object.account)