Merge branch 'master' of https://github.com/fosscord/fosscord-server
This commit is contained in:
commit
e7461aba3c
@ -120,7 +120,7 @@ router.get("/", async (req: Request, res: Response) => {
|
|||||||
delete x.user_ids;
|
delete x.user_ids;
|
||||||
});
|
});
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
if (!x.author) x.author = { discriminator: "0000", username: "Deleted User", public_flags: "0", avatar: null };
|
if (!x.author) x.author = { id: "4", discriminator: "0000", username: "Fosscord Ghost", public_flags: "0", avatar: null };
|
||||||
x.attachments?.forEach((y: any) => {
|
x.attachments?.forEach((y: any) => {
|
||||||
// dynamically set attachment proxy_url in case the endpoint changed
|
// dynamically set attachment proxy_url in case the endpoint changed
|
||||||
const uri = y.proxy_url.startsWith("http") ? y.proxy_url : `https://example.org${y.proxy_url}`;
|
const uri = y.proxy_url.startsWith("http") ? y.proxy_url : `https://example.org${y.proxy_url}`;
|
||||||
|
@ -13,7 +13,12 @@ export function adjustEmail(email?: string): string | undefined {
|
|||||||
// TODO: check accounts with uncommon email domains
|
// TODO: check accounts with uncommon email domains
|
||||||
if (domain === "gmail.com" || domain === "googlemail.com") {
|
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
|
// 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;
|
return email;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user