mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-24 06:58:06 +01:00
3a3475450e
* Encode custom emojis as resolveable objects in ActivityPub * Improve code style
19 lines
296 B
Ruby
19 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
|