feat: do not enforce TLD on email (#2075)

fix #1846
This commit is contained in:
Ludovic Ortega
2025-10-20 17:24:24 +03:00
committed by GitHub
parent 48a61d812b
commit b34ca1543a
8 changed files with 47 additions and 11 deletions

View File

@@ -221,7 +221,9 @@ class EmailAgent
this.getSettings(),
payload.notifyUser.settings?.pgpKey
);
if (validator.isEmail(payload.notifyUser.email)) {
if (
validator.isEmail(payload.notifyUser.email, { require_tld: false })
) {
await email.send(
this.buildMessage(
type,
@@ -283,7 +285,7 @@ class EmailAgent
this.getSettings(),
user.settings?.pgpKey
);
if (validator.isEmail(user.email)) {
if (validator.isEmail(user.email, { require_tld: false })) {
await email.send(
this.buildMessage(type, payload, user.email, user.displayName)
);