1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00
This commit is contained in:
Emelia Smith 2024-07-31 14:09:14 +00:00 committed by GitHub
commit c61dd10f8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 8 additions and 4 deletions

View file

@ -50,7 +50,7 @@ module SettingsHelper
def post_link_to_featured_tag(tag) def post_link_to_featured_tag(tag)
link_to( link_to(
"##{tag.display_name}", tag.formatted_name,
settings_featured_tags_path(featured_tag: { name: tag.name }), settings_featured_tags_path(featured_tag: { name: tag.name }),
method: :post method: :post
) )

View file

@ -40,6 +40,10 @@ class FeaturedTag < ApplicationRecord
attributes['name'] || tag.display_name attributes['name'] || tag.display_name
end end
def formatted_name
"##{attributes['name']}" || tag.formatted_name
end
def increment(timestamp) def increment(timestamp)
update(statuses_count: statuses_count + 1, last_status_at: timestamp) update(statuses_count: statuses_count + 1, last_status_at: timestamp)
end end

View file

@ -186,7 +186,7 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer
end end
def name def name
"##{object.name}" object.formatted_name
end end
end end

View file

@ -12,7 +12,7 @@ class ActivityPub::HashtagSerializer < ActivityPub::Serializer
end end
def name def name
"##{object.display_name}" object.formatted_name
end end
def href def href

View file

@ -269,7 +269,7 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
end end
def name def name
"##{object.name}" object.formatted_name
end end
end end