Redirect /users/:nickname.rss to /users/:nickname/feed.rss instead of .atom

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk 2025-10-14 20:29:06 +02:00
commit 50e3cc67fc
3 changed files with 21 additions and 2 deletions

View file

@ -282,6 +282,21 @@ defmodule Pleroma.Web.Feed.UserControllerTest do
"#{Pleroma.Web.Endpoint.url()}/users/#{user.nickname}/feed.atom"
end
test "redirects to rss feed when explicitly requested", %{conn: conn} do
note_activity = insert(:note_activity)
user = User.get_cached_by_ap_id(note_activity.data["actor"])
conn =
conn
|> put_req_header("accept", "application/xml")
|> get("/users/#{user.nickname}.rss")
assert conn.status == 302
assert redirected_to(conn) ==
"#{Pleroma.Web.Endpoint.url()}/users/#{user.nickname}/feed.rss"
end
test "with non-html / non-json format, it returns error when user is not found", %{conn: conn} do
response =
conn