Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into feature/unrepeats

This commit is contained in:
Francis Dinh 2018-04-20 16:47:44 -04:00
commit c5dc7e6e31
43 changed files with 405 additions and 74 deletions

View 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),