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

class ActivityPub::UndoLikeSerializer < ActiveModel::Serializer
  attributes :type, :actor

  has_one :object, serializer: ActivityPub::LikeSerializer

  def type
    'Undo'
  end

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