diff options
author | lain <lain@soykaf.club> | 2020-07-29 14:42:09 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-07-29 14:42:09 +0200 |
commit | d9bf2c58df0a828901ab7cc66c5fd35d58a485ec (patch) | |
tree | ca5a82c8397de657c29084c183a71f1f5bb7b704 /lib/pleroma/web/oauth/oauth_controller.ex | |
parent | c25c21dd22202fe0fc827ef57e5a69631fa35bf7 (diff) | |
parent | 269b61a2402e3d12d09baf26ba73359776f556b0 (diff) | |
download | pleroma-d9bf2c58df0a828901ab7cc66c5fd35d58a485ec.tar.gz |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into 1993-confirm-users-on-registration
Diffstat (limited to 'lib/pleroma/web/oauth/oauth_controller.ex')
-rw-r--r-- | lib/pleroma/web/oauth/oauth_controller.ex | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/pleroma/web/oauth/oauth_controller.ex b/lib/pleroma/web/oauth/oauth_controller.ex index 7683589cf..61fe81d33 100644 --- a/lib/pleroma/web/oauth/oauth_controller.ex +++ b/lib/pleroma/web/oauth/oauth_controller.ex @@ -337,6 +337,16 @@ defmodule Pleroma.Web.OAuth.OAuthController do ) end + defp handle_token_exchange_error(%Plug.Conn{} = conn, {:account_status, :approval_pending}) do + render_error( + conn, + :forbidden, + "Your account is awaiting approval.", + %{}, + "awaiting_approval" + ) + end + defp handle_token_exchange_error(%Plug.Conn{} = conn, _error) do render_invalid_credentials_error(conn) end |