diff options
author | Erkin Alp Güney <erkinalp9035@gmail.com> | 2022-04-18 18:57:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-18 18:57:27 +0300 |
commit | b14d5a615469ffb84a2c1fca2352ae826e5561d7 (patch) | |
tree | aa4359fd35274b71cc6aec5b585795322b13c40c | |
parent | reactions rights enforcement (diff) | |
download | server-b14d5a615469ffb84a2c1fca2352ae826e5561d7.tar.xz |
Google staff email
-rw-r--r-- | util/src/util/Email.ts | 7 |
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; |