diff options
author | lain <lain@soykaf.club> | 2020-09-04 18:22:24 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-09-04 18:22:24 +0200 |
commit | bb007b9298b514c305dff944bef8463ffe1596a8 (patch) | |
tree | c07d067339fd81f45e1b348f684b63ce412ac46f /lib/pleroma/web/twitter_api/twitter_api.ex | |
parent | 4fd705e832702f24377d6273a47cfc3752e1241b (diff) | |
parent | 2b04cdf407c9ce4134a0fe448b7f8dff7f6ff57f (diff) | |
download | pleroma-bb007b9298b514c305dff944bef8463ffe1596a8.tar.gz |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into matrix-explorations
Diffstat (limited to 'lib/pleroma/web/twitter_api/twitter_api.ex')
-rw-r--r-- | lib/pleroma/web/twitter_api/twitter_api.ex | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/pleroma/web/twitter_api/twitter_api.ex b/lib/pleroma/web/twitter_api/twitter_api.ex index 2294d9d0d..5d7948507 100644 --- a/lib/pleroma/web/twitter_api/twitter_api.ex +++ b/lib/pleroma/web/twitter_api/twitter_api.ex @@ -72,7 +72,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do def password_reset(nickname_or_email) do with true <- is_binary(nickname_or_email), - %User{local: true, email: email} = user when is_binary(email) <- + %User{local: true, email: email, deactivated: false} = user when is_binary(email) <- User.get_by_nickname_or_email(nickname_or_email), {:ok, token_record} <- Pleroma.PasswordResetToken.create_token(user) do user @@ -81,17 +81,8 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do {:ok, :enqueued} else - false -> - {:error, "bad user identifier"} - - %User{local: true, email: nil} -> + _ -> {:ok, :noop} - - %User{local: false} -> - {:error, "remote user"} - - nil -> - {:error, "unknown user"} end end |