Change minutes_retained config to seconds_retained
authorEkaterina Vaartis <vaartis@cock.li>
Sun, 16 Dec 2018 19:40:44 +0000 (22:40 +0300)
committerEkaterina Vaartis <vaartis@cock.li>
Sun, 16 Dec 2018 19:40:44 +0000 (22:40 +0300)
config/config.exs
lib/pleroma/captcha/captcha.ex

index eba401d3ec1f7ec652b2ddd19f26226dffb1e517..45a22f5da1a7e45c4104de2038a1a4c77f24bb45 100644 (file)
@@ -12,7 +12,7 @@ config :pleroma, Pleroma.Repo, types: Pleroma.PostgresTypes
 
 config :pleroma, Pleroma.Captcha,
   enabled: false,
-  minutes_retained: 5,
+  seconds_retained: 180,
   method: Pleroma.Captcha.Kocaptcha
 
 config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
index 2dcbc47174a5f4b62ffceaf1f78d80eac9c57c4e..26477a214df991f791ff4aa47dcb104a53a35aa7 100644 (file)
@@ -40,9 +40,9 @@ defmodule Pleroma.Captcha do
     else
       new_captcha = method().new()
 
-      minutes_retained = Pleroma.Config.get!([__MODULE__, :minutes_retained])
+      seconds_retained = Pleroma.Config.get!([__MODULE__, :seconds_retained])
       # Wait several minutes and if the captcha is still there, delete it
-      Process.send_after(self(), {:cleanup, new_captcha.token}, 1000 * 60 * minutes_retained)
+      Process.send_after(self(), {:cleanup, new_captcha.token}, 1000 * seconds_retained)
 
       {:reply, new_captcha, state}
     end