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:
commit
951ed00805
@ -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."
|
||||
}
|
||||
}
|
||||
|
@ -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": {
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -1,17 +1,17 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@ -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({
|
||||
|
@ -1,17 +1,17 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@ -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)
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user