aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/twitter_api/twitter_api.ex
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-04-21 08:20:50 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-04-21 08:20:50 +0300
commitbb5d0eafa437c9d32cdd8ccdb92b2eabb8ccccf1 (patch)
tree307120b8958a5be8dad4a16e6e2ff779336a30e3 /lib/pleroma/web/twitter_api/twitter_api.ex
parentf7e623c11c4b6f4f323a4317e9489092be73f9cd (diff)
parente57c1b60e4a0f882d5217bf1be8b1a7240aa322d (diff)
downloadpleroma-bb5d0eafa437c9d32cdd8ccdb92b2eabb8ccccf1.tar.gz
Merge remote-tracking branch 'remotes/origin/develop' into 1364-no-pushes-from-blocked-domains-users
# Conflicts: # CHANGELOG.md
Diffstat (limited to 'lib/pleroma/web/twitter_api/twitter_api.ex')
-rw-r--r--lib/pleroma/web/twitter_api/twitter_api.ex3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/twitter_api/twitter_api.ex b/lib/pleroma/web/twitter_api/twitter_api.ex
index f9c0994da..7a1ba6936 100644
--- a/lib/pleroma/web/twitter_api/twitter_api.ex
+++ b/lib/pleroma/web/twitter_api/twitter_api.ex
@@ -13,6 +13,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
def register_user(params, opts \\ []) do
token = params["token"]
+ trusted_app? = params["trusted_app"]
params = %{
nickname: params["nickname"],
@@ -29,7 +30,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
captcha_enabled = Pleroma.Config.get([Pleroma.Captcha, :enabled])
# true if captcha is disabled or enabled and valid, false otherwise
captcha_ok =
- if not captcha_enabled do
+ if trusted_app? || not captcha_enabled do
:ok
else
Pleroma.Captcha.validate(