18 lines
424 B
Ruby
18 lines
424 B
Ruby
# frozen_string_literal: true
|
|
|
|
class REST::CustomEmojiSerializer < REST::CustomEmojiSlimSerializer
|
|
include RoutingHelper
|
|
|
|
# Please update `app/javascript/mastodon/api_types/custom_emoji.ts` when making changes to the attributes
|
|
|
|
attribute :aliases
|
|
attribute :license
|
|
|
|
def aliases
|
|
if object.respond_to?(:aliases) && object.aliases.present?
|
|
object.aliases.compact_blank
|
|
else
|
|
[]
|
|
end
|
|
end
|
|
end
|