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
commitb14d5a615469ffb84a2c1fca2352ae826e5561d7 (patch)
treeaa4359fd35274b71cc6aec5b585795322b13c40c
parentreactions rights enforcement (diff)
downloadserver-b14d5a615469ffb84a2c1fca2352ae826e5561d7.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;