Fixed issue with status url not resolving to host

• Fixed:
- issue with status url not resolving to host
- fixes issue with status copy url in share menu
This commit is contained in:
mgabdev 2020-12-23 00:10:34 -05:00
parent e197f2091f
commit 5b40f62498
3 changed files with 7 additions and 12 deletions

View File

@ -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

View File

@ -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

View File

@ -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'