mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-20 03:25:17 +01:00
Add redirection on /deck
URLs for logged-out users (#27128)
This commit is contained in:
parent
fa98c9b077
commit
6c25730024
@ -14,6 +14,8 @@ class PermalinkRedirector
|
|||||||
find_account_url_by_name(first_segment)
|
find_account_url_by_name(first_segment)
|
||||||
elsif accounts_request? && record_integer_id_request?
|
elsif accounts_request? && record_integer_id_request?
|
||||||
find_account_url_by_id(second_segment)
|
find_account_url_by_id(second_segment)
|
||||||
|
elsif @path.start_with?('/deck')
|
||||||
|
@path.delete_prefix('/deck')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -52,7 +54,7 @@ class PermalinkRedirector
|
|||||||
end
|
end
|
||||||
|
|
||||||
def path_segments
|
def path_segments
|
||||||
@path_segments ||= @path.delete_prefix('/').split('/')
|
@path_segments ||= @path.delete_prefix('/deck').delete_prefix('/').split('/')
|
||||||
end
|
end
|
||||||
|
|
||||||
def find_status_url_by_id(id)
|
def find_status_url_by_id(id)
|
||||||
|
Loading…
Reference in New Issue
Block a user