Füge E-Mail-Benachrichtigungen für Sperrungen und zeitlich begrenzte Sperrungen hinzu

This commit is contained in:
PxlLoewe
2025-06-28 00:13:55 -07:00
parent 1a1fab3f58
commit 96fcf7e4a5
12 changed files with 445 additions and 53 deletions

View File

@@ -21,19 +21,14 @@ export const getPublicUser = (
ignorePrivacy: false,
},
): PublicUser => {
const lastName = user.lastname
.split(" ")
.map((part) => `${part[0]}.`)
.join(" ");
return {
firstname: user.firstname,
lastname:
user.settingsHideLastname && !options.ignorePrivacy
? ""
: user.lastname
.split(" ")
.map((part) => `${part[0]}.`)
.join(" "), // Only take the first part of the name
fullName: `${user.firstname} ${user.lastname
.split(" ")
.map((part) => `${part[0]}.`)
.join(" ")}`,
lastname: user.settingsHideLastname && !options.ignorePrivacy ? "" : lastName, // Only take the first letter of each section of the last name
fullName: `${user.firstname} ${lastName}`,
publicId: user.publicId,
badges: user.badges,
};