mirror of
https://github.com/mastodon/mastodon.git
synced 2026-04-28 10:57:50 -05:00
24 lines
465 B
Ruby
24 lines
465 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ActivityPub::AddNoteSerializer < ActivityPub::Serializer
|
|
attributes :type, :actor, :target
|
|
|
|
has_one :proper_object, key: :object
|
|
|
|
def type
|
|
'Add'
|
|
end
|
|
|
|
def actor
|
|
ActivityPub::TagManager.instance.uri_for(object.account)
|
|
end
|
|
|
|
def proper_object
|
|
ActivityPub::TagManager.instance.uri_for(object)
|
|
end
|
|
|
|
def target
|
|
ActivityPub::TagManager.instance.collection_uri_for(object.account, :featured)
|
|
end
|
|
end
|