summary refs log tree commit diff
diff options
context:
space:
mode:
authorErkin Alp Güney <erkinalp9035@gmail.com>2022-04-18 18:57:27 +0300
committerGitHub <noreply@github.com>2022-04-18 18:57:27 +0300
commit02528473d6ca301e0f35335b8dd76bceea56e26b (patch)
tree885864054bfcd41ce60fb30c64556d85b125ad10
parentreactions rights enforcement (diff)
downloadserver-02528473d6ca301e0f35335b8dd76bceea56e26b.tar.xz
Google staff email
-rw-r--r--util/src/util/Email.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/util/src/util/Email.ts b/util/src/util/Email.ts

index b1a7599b..6885da33 100644 --- a/util/src/util/Email.ts +++ b/util/src/util/Email.ts
@@ -13,7 +13,12 @@ export function adjustEmail(email?: string): string | undefined { // TODO: check accounts with uncommon email domains if (domain === "gmail.com" || domain === "googlemail.com") { // replace .dots and +alternatives -> Gmail Dot Trick https://support.google.com/mail/answer/7436150 and https://generator.email/blog/gmail-generator - return user.replace(/[.]|(\+.*)/g, "") + "@gmail.com"; + let v = user.replace(/[.]|(\+.*)/g, "") + "@gmail.com"; + } + + if (domain === "google.com") { + // replace .dots and +alternatives -> Google Staff GMail Dot Trick + let v = user.replace(/[.]|(\+.*)/g, "") + "@google.com"; } return email;