Merge commit '598ae4f2da86029b1c3c3e35e64b89873037b598' into glitch-soc/merge-upstream

Conflicts:
- `config/routes/api.rb`:
  Upstream added an endpoint, textually close to a glitch-soc-only endpoint.
  Ported upstream changes.
This commit is contained in:
Claire
2024-07-30 20:47:34 +02:00
99 changed files with 539 additions and 103 deletions

View File

@@ -143,7 +143,11 @@ Rails.application.routes.draw do
resource :inbox, only: [:create], module: :activitypub
get '/:encoded_at(*path)', to: redirect('/@%{path}'), constraints: { encoded_at: /%40/ }
constraints(encoded_path: /%40.*/) do
get '/:encoded_path', to: redirect { |params|
"/#{params[:encoded_path].gsub('%40', '@')}"
}
end
constraints(username: %r{[^@/.]+}) do
with_options to: 'accounts#show' do