diff --git a/app/lib/tag_manager.rb b/app/lib/tag_manager.rb index 0510048a..5d8a2ce0 100644 --- a/app/lib/tag_manager.rb +++ b/app/lib/tag_manager.rb @@ -47,7 +47,7 @@ class TagManager when :person "/#{target.username}" when :note, :comment, :activity - "/#{target.account.username}/posts/#{target.id}" + short_account_status_url(target.account, target) end end end diff --git a/app/serializers/rest/status_serializer.rb b/app/serializers/rest/status_serializer.rb index 29e19622..184c6c35 100644 --- a/app/serializers/rest/status_serializer.rb +++ b/app/serializers/rest/status_serializer.rb @@ -60,9 +60,6 @@ class REST::StatusSerializer < ActiveModel::Serializer def uri "/#{object.account.username}/posts/#{object.id}" - # uri: "https://gab.com/users/a/statuses/105075286733432550" - # url: "https://gab.com/a/posts/105075286733432550" - # TagManager.instance.uri_for(object) end def content diff --git a/config/routes.rb b/config/routes.rb index fb3a65ca..a98b309c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -407,14 +407,12 @@ Rails.application.routes.draw do get '/', to: 'react#react', as: :homepage - # : todo : - # get '/:username/with_replies', to: 'accounts#show', username: username_regex, as: :short_account_with_replies - # get '/:username/comments_only', to: 'accounts#show', username: username_regex, as: :short_account_comments_only - # get '/:username/media', to: 'accounts#show', username: username_regex, as: :short_account_media - # get '/:username/tagged/:tag', to: 'accounts#show', username: username_regex, as: :short_account_tag - # get '/:username/posts/:statusId/reblogs', to: 'statuses#show', username: username_regex - # get '/:account_username/posts/:id', to: 'statuses#show', account_username: username_regex, as: :short_account_status - # get '/:account_username/posts/:id/embed', to: 'statuses#embed', account_username: username_regex, as: :embed_short_account_status + get '/:username', to: 'accounts#show', username: username_regex, as: :short_account_with_replies + get '/:username/comments', to: 'accounts#show', username: username_regex, as: :short_account_comments_only + get '/:username/photos', to: 'accounts#show', username: username_regex, as: :short_account_media + get '/:username/posts/:statusId', to: 'statuses#show', username: username_regex + get '/:account_username/posts/:id', to: 'statuses#show', account_username: username_regex, as: :short_account_status + get '/:account_username/posts/:id/embed', to: 'statuses#embed', account_username: username_regex, as: :embed_short_account_status get '/about', to: 'react#react' get '/about/tos', to: 'react#react' get '/about/privacy', to: 'react#react'