about summary refs log tree commit diff
path: root/app/serializers/activitypub/delete_serializer.rb
blob: 77098b1b0c6c5189e99f2a81dd5da4263e6636d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

class ActivityPub::DeleteSerializer < ActiveModel::Serializer
  attributes :type, :actor
  attribute :virtual_object, key: :object

  def type
    'Delete'
  end

  def actor
    ActivityPub::TagManager.instance.uri_for(object.account)
  end

  def virtual_object
    ActivityPub::TagManager.instance.uri_for(object)
  end
end