aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2020-08-03 19:57:53 -0500
committerAlex Gleason <alex@alexgleason.me>2020-08-03 19:57:53 -0500
commit058daf498f10e58221bd29a42799f52e56a800a9 (patch)
treebce49ba5dafc8c5845d28956166fd709ea319e3d
parentde3bdc63adac0141500bdc2692124cd104330bda (diff)
downloadpleroma-058daf498f10e58221bd29a42799f52e56a800a9.tar.gz
Email blacklist: Update response phrasing
-rw-r--r--lib/pleroma/user.ex2
-rw-r--r--test/web/mastodon_api/controllers/account_controller_test.exs2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex
index d0cc098fe..16679ac42 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -684,7 +684,7 @@ defmodule Pleroma.User do
!String.ends_with?(email, ["@" <> blacklisted_domain, "." <> blacklisted_domain])
end)
- if valid?, do: [], else: [email: "Email domain is blacklisted"]
+ if valid?, do: [], else: [credentials: "Invalid credentials"]
end)
|> unique_constraint(:nickname)
|> validate_exclusion(:nickname, Config.get([User, :restricted_nicknames]))
diff --git a/test/web/mastodon_api/controllers/account_controller_test.exs b/test/web/mastodon_api/controllers/account_controller_test.exs
index 2cb388655..86e3ac3e7 100644
--- a/test/web/mastodon_api/controllers/account_controller_test.exs
+++ b/test/web/mastodon_api/controllers/account_controller_test.exs
@@ -956,7 +956,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
|> put_req_header("authorization", "Bearer " <> token)
|> post("/api/v1/accounts", params)
- assert %{"error" => "{\"email\":[\"Email domain is blacklisted\"]}"} =
+ assert %{"error" => "{\"credentials\":[\"Invalid credentials\"]}"} =
json_response_and_validate_schema(conn, 400)
Pleroma.Config.put([User, :email_blacklist], [])