diff options
author | Alex Gleason <alex@alexgleason.me> | 2020-07-29 12:43:39 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2020-07-29 12:43:39 -0500 |
commit | d8a01c94321e90832fea5a26fbb2a2f5be1c5ba5 (patch) | |
tree | 43a18b75775223594f58860098e231068000b0d4 /lib/pleroma/web/oauth/oauth_controller.ex | |
parent | 3b7c454418700ca36c0a71272f913ea8c6e464e9 (diff) | |
parent | a6d3bb5f30697cafc5dd9acf490bde7e2f33f5f8 (diff) | |
download | pleroma-d8a01c94321e90832fea5a26fbb2a2f5be1c5ba5.tar.gz |
Merge remote-tracking branch 'upstream/develop' into hide-reactions
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 |