Redirect html user profile request.
authorRoger Braun <roger@rogerbraun.net>
Mon, 12 Jun 2017 10:52:40 +0000 (12:52 +0200)
committerRoger Braun <roger@rogerbraun.net>
Mon, 12 Jun 2017 10:52:40 +0000 (12:52 +0200)
lib/pleroma/web/ostatus/ostatus_controller.ex

index 948996d01a36bbf9298a90059dcb6ecaaad1fa53..e676a60c3dd8efc7a1360ff8f1233416fa018ff6 100644 (file)
@@ -9,7 +9,11 @@ defmodule Pleroma.Web.OStatus.OStatusController do
 
   def feed_redirect(conn, %{"nickname" => nickname}) do
     user = User.get_cached_by_nickname(nickname)
-    redirect conn, external: OStatus.feed_path(user)
+
+    case get_format(conn) do
+      "html" -> Fallback.RedirectController.redirector(conn, nil)
+      _ -> redirect conn, external: OStatus.feed_path(user)
+    end
   end
 
   def feed(conn, %{"nickname" => nickname}) do