From 3a31fdaf0668b4fb4d05c3087674c2b32b6afbe9 Mon Sep 17 00:00:00 2001 From: Ekaterina Vaartis Date: Sun, 16 Dec 2018 22:40:44 +0300 Subject: [PATCH] Change minutes_retained config to seconds_retained --- config/config.exs | 2 +- lib/pleroma/captcha/captcha.ex | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.exs b/config/config.exs index eba401d3e..45a22f5da 100644 --- a/config/config.exs +++ b/config/config.exs @@ -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" diff --git a/lib/pleroma/captcha/captcha.ex b/lib/pleroma/captcha/captcha.ex index 2dcbc4717..26477a214 100644 --- a/lib/pleroma/captcha/captcha.ex +++ b/lib/pleroma/captcha/captcha.ex @@ -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 -- 2.45.2