mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 11:11:11 +02:00
23 lines
440 B
Ruby
23 lines
440 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ActivityPub::FeatureRequestSerializer < ActivityPub::Serializer
|
|
attributes :id, :type, :instrument
|
|
attribute :virtual_object, key: :object
|
|
|
|
def id
|
|
object.activity_uri
|
|
end
|
|
|
|
def type
|
|
'FeatureRequest'
|
|
end
|
|
|
|
def virtual_object
|
|
ActivityPub::TagManager.instance.uri_for(object.account)
|
|
end
|
|
|
|
def instrument
|
|
ActivityPub::TagManager.instance.uri_for(object.collection)
|
|
end
|
|
end
|