瀏覽代碼

Email blacklist: Update phrasing again

note-update
Alex Gleason 3 年之前
父節點
當前提交
4f57e85ab9
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 7211D1F99744FBB7
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. +1
    -1
      lib/pleroma/user.ex
  2. +1
    -1
      test/web/mastodon_api/controllers/account_controller_test.exs

+ 1
- 1
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: [credentials: "Invalid credentials"]
if valid?, do: [], else: [email: "Invalid email"]
end)
|> unique_constraint(:nickname)
|> validate_exclusion(:nickname, Config.get([User, :restricted_nicknames]))


+ 1
- 1
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" => "{\"credentials\":[\"Invalid credentials\"]}"} =
assert %{"error" => "{\"email\":[\"Invalid email\"]}"} =
json_response_and_validate_schema(conn, 400)

Pleroma.Config.put([User, :email_blacklist], [])


Loading…
取消
儲存