Merge branch 'master' of https://github.com/fosscord/fosscord-server
This commit is contained in:
@@ -125,6 +125,7 @@ export interface ConfigValue {
|
||||
required: boolean;
|
||||
minimum: number; // in years
|
||||
};
|
||||
disabled: boolean;
|
||||
requireCaptcha: boolean;
|
||||
requireInvite: boolean;
|
||||
allowNewRegistration: boolean;
|
||||
@@ -143,6 +144,10 @@ export interface ConfigValue {
|
||||
useDefaultAsOptimal: boolean;
|
||||
available: Region[];
|
||||
};
|
||||
|
||||
guild: {
|
||||
showAllGuildsInDiscovery: boolean;
|
||||
};
|
||||
rabbitmq: {
|
||||
host: string | null;
|
||||
};
|
||||
@@ -266,6 +271,7 @@ export const DefaultConfigOptions: ConfigValue = {
|
||||
required: false,
|
||||
minimum: 13,
|
||||
},
|
||||
disabled: false,
|
||||
requireInvite: false,
|
||||
requireCaptcha: true,
|
||||
allowNewRegistration: true,
|
||||
@@ -293,6 +299,10 @@ export const DefaultConfigOptions: ConfigValue = {
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
guild: {
|
||||
showAllGuildsInDiscovery: false,
|
||||
},
|
||||
rabbitmq: {
|
||||
host: null,
|
||||
},
|
||||
|
||||
@@ -74,9 +74,7 @@ export class Message extends BaseClass {
|
||||
author_id: string;
|
||||
|
||||
@JoinColumn({ name: "author_id", referencedColumnName: "id" })
|
||||
@ManyToOne(() => User, {
|
||||
onDelete: "CASCADE",
|
||||
})
|
||||
@ManyToOne(() => User)
|
||||
author?: User;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@@ -120,7 +118,7 @@ export class Message extends BaseClass {
|
||||
mention_everyone?: boolean;
|
||||
|
||||
@JoinTable({ name: "message_user_mentions" })
|
||||
@ManyToMany(() => User, { orphanedRowAction: "delete", onDelete: "CASCADE", cascade: true })
|
||||
@ManyToMany(() => User)
|
||||
mentions: User[];
|
||||
|
||||
@JoinTable({ name: "message_role_mentions" })
|
||||
|
||||
@@ -3,7 +3,6 @@ import { BaseClass } from "./BaseClass";
|
||||
import { BitField } from "../util/BitField";
|
||||
import { Relationship } from "./Relationship";
|
||||
import { ConnectedAccount } from "./ConnectedAccount";
|
||||
import { HTTPError } from "lambert-server";
|
||||
|
||||
export enum PublicUserEnum {
|
||||
username,
|
||||
@@ -126,6 +125,9 @@ export class User extends BaseClass {
|
||||
@Column()
|
||||
public_flags: number;
|
||||
|
||||
@Column()
|
||||
rights: string; // Rights
|
||||
|
||||
@JoinColumn({ name: "relationship_ids" })
|
||||
@OneToMany(() => Relationship, (relationship: Relationship) => relationship.from, {
|
||||
cascade: true,
|
||||
@@ -278,5 +280,7 @@ export class UserFlags extends BitField {
|
||||
UNDERAGE_DELETED: BigInt(1) << BigInt(15),
|
||||
VERIFIED_BOT: BigInt(1) << BigInt(16),
|
||||
EARLY_VERIFIED_BOT_DEVELOPER: BigInt(1) << BigInt(17),
|
||||
CERTIFIED_MODERATOR: BigInt(1) << BigInt(18),
|
||||
BOT_HTTP_INTERACTIONS: BigInt(1) << BigInt(19),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user