From 02528473d6ca301e0f35335b8dd76bceea56e26b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkin=20Alp=20G=C3=BCney?= Date: Mon, 18 Apr 2022 18:57:27 +0300 Subject: [PATCH] Google staff email --- util/src/util/Email.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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;