blob: 2b24eb8cc1594a597e875a6e6f1928f6519fa9f4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# frozen_string_literal: true
class ActivityPub::HashtagSerializer < ActivityPub::Serializer
context_extensions :hashtag
include RoutingHelper
attributes :type, :href, :name
def type
'Hashtag'
end
def name
"##{object.display_name}"
end
def href
if object.instance_of?(FeaturedTag)
short_account_tag_url(object.account, object.tag)
else
tag_url(object)
end
end
end
|