Revert "Better error handling for user feeds."
authorRoger Braun <roger@rogerbraun.net>
Thu, 3 Aug 2017 15:49:18 +0000 (17:49 +0200)
committerRoger Braun <roger@rogerbraun.net>
Thu, 3 Aug 2017 15:49:18 +0000 (17:49 +0200)
This reverts commit 11714fbaa2b90e1fc577d2b9b3d4075a44181633.

lib/pleroma/web/ostatus/ostatus_controller.ex

index a2c2a4b4ca3f8b45bf67cef9884b404a1b4e4eb2..05acfd04bc0f3d5879b4a4c4e3b9d185e8676339 100644 (file)
@@ -8,13 +8,11 @@ defmodule Pleroma.Web.OStatus.OStatusController do
   import Ecto.Query
 
   def feed_redirect(conn, %{"nickname" => nickname}) do
-    with %User{} = user <- User.get_cached_by_nickname(nickname) do
-      case get_format(conn) do
-        "html" -> Fallback.RedirectController.redirector(conn, nil)
-        _ -> redirect conn, external: OStatus.feed_path(user)
-      end
-    else
-      _e -> send_resp(conn, 404, "No user found")
+    user = User.get_cached_by_nickname(nickname)
+
+    case get_format(conn) do
+      "html" -> Fallback.RedirectController.redirector(conn, nil)
+      _ -> redirect conn, external: OStatus.feed_path(user)
     end
   end