1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-25 03:33:33 +01:00

Merge branch 'master' into feat/local-image-proxy

This commit is contained in:
TomatoCake 2024-06-28 10:17:31 +02:00 committed by GitHub
commit 951ed00805
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 53 additions and 20 deletions

View File

@ -1,16 +1,24 @@
{
"login": {
"INVALID_LOGIN": "E-Mail or Phone not found",
"INVALID_PASSWORD": "Invalid Password",
"ACCOUNT_DISABLED": "This account is disabled"
"INVALID_LOGIN": "Ungültiger Benutzername/E-Mail oder Passwort.",
"INVALID_PASSWORD": "Ungültiges Passwort",
"ACCOUNT_DISABLED": "Dieser Account wurde deaktiviert",
"INVALID_TOTP_CODE": "Ungültiger Zwei-Faktor-Authentifierungs-Code.",
"INVALID_TOTP_SECRET": "Ungültiges Zwei-Faktor-Authentifierungs-Secret"
},
"register": {
"REGISTRATION_DISABLED": "New user registration is disabled",
"INVITE_ONLY": "You must be invited to register",
"EMAIL_INVALID": "Invalid Email",
"EMAIL_ALREADY_REGISTERED": "Email is already registered",
"DATE_OF_BIRTH_UNDERAGE": "You need to be {{years}} years or older",
"CONSENT_REQUIRED": "You must agree to the Terms of Service and Privacy Policy.",
"USERNAME_TOO_MANY_USERS": "Too many users have this username, please try another"
"REGISTRATION_DISABLED": "Die Registrierung von neuen Benutzern ist deaktiviert",
"INVITE_ONLY": "Du musst eingeladen werden, um dich registrieren zu können",
"EMAIL_INVALID": "Ungültige E-Mail-Adresse",
"EMAIL_ALREADY_REGISTERED": "E-Mail-Adresse ist bereits registriert",
"DATE_OF_BIRTH_UNDERAGE": "Du musst mindestens {{years}} Jahre oder älter sein",
"PASSWORD_REQUIREMENTS_MIN_LENGTH": "Das Passwort muss mindestens {{min}} Zeichen lang sein.",
"CONSENT_REQUIRED": "Du musst den Nutzungsbedingungen und der Datenschutzerklärung zustimmen.",
"USERNAME_TOO_MANY_USERS": "Zu viele Nutzer haben diesen Benutzernamen, bitte probiere einen anderen",
"TOO_MANY_REGISTRATIONS": "Zu viele Registrierungen, bitte versuche es später erneut"
},
"password_reset": {
"EMAIL_DOES_NOT_EXIST": "E-Mail-Adresse existiert nicht.",
"INVALID_TOKEN": "Ungültiger Token."
}
}

View File

@ -12,9 +12,9 @@
"EMAIL_INVALID": "Invalid Email",
"EMAIL_ALREADY_REGISTERED": "Email is already registered",
"DATE_OF_BIRTH_UNDERAGE": "You need to be {{years}} years or older",
"PASSWORD_REQUIREMENTS_MIN_LENGTH": "The password must be at least {{min}} characters long.",
"CONSENT_REQUIRED": "You must agree to the Terms of Service and Privacy Policy.",
"USERNAME_TOO_MANY_USERS": "Too many users have this username, please try another",
"GUESTS_DISABLED": "Guest users are disabled",
"TOO_MANY_REGISTRATIONS": "Too many registrations, please try again later"
},
"password_reset": {

View File

@ -10,8 +10,8 @@
"EMAIL_INVALID": "Invalid Email",
"EMAIL_ALREADY_REGISTERED": "Email is already registered",
"DATE_OF_BIRTH_UNDERAGE": "You need to be {{years}} years or older",
"PASSWORD_REQUIREMENTS_MIN_LENGTH": "Must be at least {{min}} characters long.",
"CONSENT_REQUIRED": "You must agree to the Terms of Service and Privacy Policy.",
"PASSWORD_REQUIREMENTS_MIN_LENGTH": "The password must be at least {{min}} characters long.",
"CONSENT_REQUIRED": "You must agree to the Terms of Service and Privacy Policy.",
"USERNAME_TOO_MANY_USERS": "Too many users have this username, please try another"
}
}

View File

@ -90,6 +90,24 @@ router.delete(
} else if (channel.type === ChannelType.GROUP_DM) {
await Channel.removeRecipientFromChannel(channel, req.user_id);
} else {
if (channel.type == ChannelType.GUILD_CATEGORY) {
const channels = await Channel.find({
where: { parent_id: channel_id },
});
for await (const c of channels) {
c.parent_id = null;
await Promise.all([
c.save(),
emitEvent({
event: "CHANNEL_UPDATE",
data: c,
channel_id: c.id,
} as ChannelUpdateEvent),
]);
}
}
await Promise.all([
Channel.delete({ id: channel_id }),
emitEvent({

View File

@ -105,7 +105,7 @@ export class Channel extends BaseClass {
@Column({ nullable: true })
@RelationId((channel: Channel) => channel.parent)
parent_id: string;
parent_id: string | null;
@JoinColumn({ name: "parent_id" })
@ManyToOne(() => Channel)

View File

@ -63,6 +63,9 @@ export class UserSettings extends BaseClassWithoutId {
@Column({ nullable: true })
explicit_content_filter: number = 0;
@Column({ nullable: true })
friend_discovery_flags: number = 0;
@Column({ nullable: true, type: "simple-json" })
friend_source_flags: FriendSourceFlags = { all: true };
@ -116,6 +119,10 @@ export class UserSettings extends BaseClassWithoutId {
@Column({ nullable: true })
timezone_offset: number = 0; // e.g -60
@Column({ nullable: true })
view_nsfw_guilds: boolean = true;
}
interface CustomStatus {