aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/oauth/oauth_controller.ex
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2020-07-29 13:01:16 -0500
committerAlex Gleason <alex@alexgleason.me>2020-07-29 13:01:16 -0500
commit702f0fb822d40f0e004df1cdf3d9c2079ddc98e5 (patch)
tree0dd822004be00402b84a9537506b9de3fd0bf5b6 /lib/pleroma/web/oauth/oauth_controller.ex
parent93638935d783c092dabac51982426ebd98a21e0e (diff)
parenta6d3bb5f30697cafc5dd9acf490bde7e2f33f5f8 (diff)
downloadpleroma-702f0fb822d40f0e004df1cdf3d9c2079ddc98e5.tar.gz
Merge remote-tracking branch 'upstream/develop' into mrf-silence
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