1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00
mastodon/app/serializers/activitypub/image_serializer.rb

20 lines
296 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class ActivityPub::ImageSerializer < ActiveModel::Serializer
include RoutingHelper
attributes :type, :media_type, :url
def type
'Image'
end
def url
full_asset_url(object.url(:original))
end
def media_type
object.content_type
end
end