From: William Pitcock Date: Sun, 26 Aug 2018 22:46:25 +0000 (+0000) Subject: fix formatting X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=bc3c30430e564a510c80694ef30091942520d1e8;p=akkoma fix formatting --- diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index 913152c5a..68e159f6a 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -13,9 +13,12 @@ defmodule Pleroma.Web.Router do :ok, cond do # First, try logging in as if it was a name - user = Repo.get_by(User, %{nickname: username_or_email}) -> user + user = Repo.get_by(User, %{nickname: username_or_email}) -> + user + # If we get nil, we try using it as an email - user = Repo.get_by(User, %{email: username_or_email}) -> user + user = Repo.get_by(User, %{email: username_or_email}) -> + user end } end