From 27b8e3affbb424e1e4bd45d858474739ddbc54e8 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Thu, 3 Aug 2017 17:49:18 +0200 Subject: [PATCH] Revert "Better error handling for user feeds." This reverts commit 11714fbaa2b90e1fc577d2b9b3d4075a44181633. --- lib/pleroma/web/ostatus/ostatus_controller.ex | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/pleroma/web/ostatus/ostatus_controller.ex b/lib/pleroma/web/ostatus/ostatus_controller.ex index a2c2a4b4c..05acfd04b 100644 --- a/lib/pleroma/web/ostatus/ostatus_controller.ex +++ b/lib/pleroma/web/ostatus/ostatus_controller.ex @@ -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 -- 2.45.2