Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into feature...
[akkoma] / lib / pleroma / web / mastodon_api / mastodon_api_controller.ex
index ebd587d26ed4f669edd4a123422379ad30277191..a49be058865cc76e4a2c6f9546840ae5a36479ef 100644 (file)
@@ -217,8 +217,8 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
         activities = []
       else
         activities =
-         ActivityPub.fetch_public_activities(params)
-         |> Enum.reverse()
+          ActivityPub.fetch_public_activities(params)
+          |> Enum.reverse()
       end
 
       conn
@@ -700,7 +700,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
   end
 
   def login_post(conn, %{"authorization" => %{"name" => name, "password" => password}}) do
-    with %User{} = user <- User.get_cached_by_nickname(name),
+    with %User{} = user <- User.get_by_nickname_or_email(name),
          true <- Pbkdf2.checkpw(password, user.password_hash),
          {:ok, app} <- get_or_make_app(),
          {:ok, auth} <- Authorization.create_authorization(app, user),