1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-23 10:52:30 +01:00

Google staff email

This commit is contained in:
Erkin Alp Güney 2022-04-18 18:57:27 +03:00 committed by GitHub
parent e2b27a8d2c
commit 02528473d6

View File

@ -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;