projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'upstream/develop' into registration-workflow
[akkoma]
/
lib
/
pleroma
/
captcha
/
kocaptcha.ex
diff --git
a/lib/pleroma/captcha/kocaptcha.ex
b/lib/pleroma/captcha/kocaptcha.ex
index 6bc2fa158a2045182b9641c2f04166e168eaded7..201b55ab464597b313c033df5ac6e9f84b8cff6f 100644
(file)
--- a/
lib/pleroma/captcha/kocaptcha.ex
+++ b/
lib/pleroma/captcha/kocaptcha.ex
@@
-10,7
+10,7
@@
defmodule Pleroma.Captcha.Kocaptcha do
def new do
endpoint = Pleroma.Config.get!([__MODULE__, :endpoint])
def new do
endpoint = Pleroma.Config.get!([__MODULE__, :endpoint])
- case
Tesla
.get(endpoint <> "/new") do
+ case
Pleroma.HTTP
.get(endpoint <> "/new") do
{:error, _} ->
%{error: :kocaptcha_service_unavailable}
{:error, _} ->
%{error: :kocaptcha_service_unavailable}
@@
-21,7
+21,8
@@
defmodule Pleroma.Captcha.Kocaptcha do
type: :kocaptcha,
token: json_resp["token"],
url: endpoint <> json_resp["url"],
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
}
end
end