summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-07-30 08:41:46 +0000
committerlain <lain@soykaf.club>2020-07-30 08:41:46 +0000
commitd39b72c8fa8b338d6afd02af3d0870ccca391aba (patch)
tree6feb5123a80af8bc2cee8f10288ce3bde0ed8729 /lib
parenta0623c5db226a54998923ebab01703a7cee3dad5 (diff)
parent20d89472e3b48453b5e2e71cce0f6d97cddbbf53 (diff)
downloadpleroma-d39b72c8fa8b338d6afd02af3d0870ccca391aba.tar.gz
pleroma-d39b72c8fa8b338d6afd02af3d0870ccca391aba.zip
Merge branch 'feature/captcha-expose-timeout' into 'develop'
Expose seconds_valid in Pleroma Captcha API endpoint Closes #1954 See merge request pleroma/pleroma!2812
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/captcha/kocaptcha.ex3
-rw-r--r--lib/pleroma/captcha/native.ex3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/pleroma/captcha/kocaptcha.ex b/lib/pleroma/captcha/kocaptcha.ex
index 6bc2fa158..337506647 100644
--- a/lib/pleroma/captcha/kocaptcha.ex
+++ b/lib/pleroma/captcha/kocaptcha.ex
@@ -21,7 +21,8 @@ defmodule Pleroma.Captcha.Kocaptcha do
type: :kocaptcha,
token: json_resp["token"],
url: endpoint <> json_resp["url"],
- answer_data: json_resp["md5"]
+ answer_data: json_resp["md5"],
+ seconds_valid: Pleroma.Config.get([Pleroma.Captcha, :seconds_valid])
}
end
end
diff --git a/lib/pleroma/captcha/native.ex b/lib/pleroma/captcha/native.ex
index a90631d61..8d604d2b2 100644
--- a/lib/pleroma/captcha/native.ex
+++ b/lib/pleroma/captcha/native.ex
@@ -17,7 +17,8 @@ defmodule Pleroma.Captcha.Native do
type: :native,
token: token(),
url: "data:image/png;base64," <> Base.encode64(img_binary),
- answer_data: answer_data
+ answer_data: answer_data,
+ seconds_valid: Pleroma.Config.get([Pleroma.Captcha, :seconds_valid])
}
end
end