1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-30 15:58:28 +09:00
YuruToot/app/serializers/activitypub/image_serializer.rb
Eugen Rochko 3a3475450e Encode custom emojis as resolveable objects in ActivityPub (#5243)
* Encode custom emojis as resolveable objects in ActivityPub

* Improve code style
2017-10-07 17:43:42 +02:00

20 lines
296 B
Ruby

# 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