diff options
author | lain <lain@soykaf.club> | 2020-05-03 12:55:29 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-05-03 12:55:29 +0200 |
commit | 6fb96f64c13597bcf8d10f30442ac61610cec58e (patch) | |
tree | 29db6b5d77a562dd496618ebcd54c15574f093a8 /lib/pleroma/captcha/native.ex | |
parent | 4dfc617cdf1c2579f4f941dcd0fa5c728178df06 (diff) | |
parent | 095635453ac58b9e01a32ad226c0b61466c16da0 (diff) | |
download | pleroma-6fb96f64c13597bcf8d10f30442ac61610cec58e.tar.gz |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/delete-validator
Diffstat (limited to 'lib/pleroma/captcha/native.ex')
-rw-r--r-- | lib/pleroma/captcha/native.ex | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/pleroma/captcha/native.ex b/lib/pleroma/captcha/native.ex index 06c479ca9..a90631d61 100644 --- a/lib/pleroma/captcha/native.ex +++ b/lib/pleroma/captcha/native.ex @@ -3,7 +3,6 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Captcha.Native do - import Pleroma.Web.Gettext alias Pleroma.Captcha.Service @behaviour Service @@ -11,7 +10,7 @@ defmodule Pleroma.Captcha.Native do def new do case Captcha.get() do :error -> - %{error: dgettext("errors", "Captcha error")} + %{error: :captcha_error} {:ok, answer_data, img_binary} -> %{ @@ -25,7 +24,7 @@ defmodule Pleroma.Captcha.Native do @impl Service def validate(_token, captcha, captcha) when not is_nil(captcha), do: :ok - def validate(_token, _captcha, _answer), do: {:error, dgettext("errors", "Invalid CAPTCHA")} + def validate(_token, _captcha, _answer), do: {:error, :invalid} defp token do 10 |