aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/oauth/oauth_controller.ex
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2020-07-30 08:52:13 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2020-07-30 08:52:13 +0300
commitcff7bb5cd4b9e564e94a7e7f4e11c6f9ebf5bc36 (patch)
tree021c25a91263cfd9e67ad017bacf3cba41699c3b /lib/pleroma/web/oauth/oauth_controller.ex
parentcd2423d7f5c082d49fb429708bb8476342b35136 (diff)
parenta6d3bb5f30697cafc5dd9acf490bde7e2f33f5f8 (diff)
downloadpleroma-cff7bb5cd4b9e564e94a7e7f4e11c6f9ebf5bc36.tar.gz
Merge branch 'develop' into issue/1933-update-dependency
Diffstat (limited to 'lib/pleroma/web/oauth/oauth_controller.ex')
-rw-r--r--lib/pleroma/web/oauth/oauth_controller.ex10
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