diff --git a/util/src/entities/Config.ts b/util/src/entities/Config.ts
index 3756d686..e545e36a 100644
--- a/util/src/entities/Config.ts
+++ b/util/src/entities/Config.ts
@@ -4,6 +4,7 @@ import crypto from "crypto";
import { Snowflake } from "../util/Snowflake";
import { SessionsReplace } from "..";
import { hostname } from "os";
+import { Rights } from "../util/Rights";
@Entity("config")
export class ConfigEntity extends BaseClassWithoutId {
@@ -49,6 +50,8 @@ export interface ConfigValue {
endpointClient: string | null;
endpointPublic: string | null;
endpointPrivate: string | null;
+ resizeHeightMax: number | null;
+ resizeWidthMax: number | null;
};
api: {
defaultVersion: string;
@@ -121,6 +124,7 @@ export interface ConfigValue {
secret: string | null;
};
ipdataApiKey: string | null;
+ defaultRights: string;
};
login: {
requireCaptcha: boolean;
@@ -169,6 +173,7 @@ export interface ConfigValue {
guilds: string[];
canLeave: boolean;
};
+ defaultFeatures: string[];
};
gif: {
enabled: boolean;
@@ -192,7 +197,7 @@ export interface ConfigValue {
releases: {
useLocalRelease: Boolean; //TODO
upstreamVersion: string;
- }
+ };
},
metrics: {
timeout: number;
@@ -202,7 +207,7 @@ export interface ConfigValue {
endpoint: string;
traceSampleRate: number;
environment: string;
- }
+ };
}
export const DefaultConfigOptions: ConfigValue = {
@@ -215,6 +220,8 @@ export const DefaultConfigOptions: ConfigValue = {
endpointClient: null,
endpointPrivate: null,
endpointPublic: null,
+ resizeHeightMax: 1000,
+ resizeWidthMax: 1000,
},
api: {
defaultVersion: "9",
@@ -312,6 +319,34 @@ export const DefaultConfigOptions: ConfigValue = {
secret: null,
},
ipdataApiKey: "eca677b284b3bac29eb72f5e496aa9047f26543605efe99ff2ce35c9",
+ defaultRights: (
+ Rights.FLAGS.CREATE_CHANNELS +
+ Rights.FLAGS.CREATE_DMS +
+ Rights.FLAGS.CREATE_DM_GROUPS +
+ Rights.FLAGS.CREATE_GUILDS +
+ Rights.FLAGS.CREATE_INVITES +
+ Rights.FLAGS.CREATE_ROLES +
+ Rights.FLAGS.CREATE_TEMPLATES +
+ Rights.FLAGS.CREATE_WEBHOOKS +
+ Rights.FLAGS.JOIN_GUILDS +
+ Rights.FLAGS.PIN_MESSAGES +
+ Rights.FLAGS.SELF_ADD_REACTIONS +
+ Rights.FLAGS.SELF_DELETE_MESSAGES +
+ Rights.FLAGS.SELF_EDIT_MESSAGES +
+ Rights.FLAGS.SELF_EDIT_NAME +
+ Rights.FLAGS.SEND_MESSAGES +
+ Rights.FLAGS.USE_ACTIVITIES +
+ Rights.FLAGS.USE_VIDEO +
+ Rights.FLAGS.USE_VOICE +
+ Rights.FLAGS.INVITE_USERS +
+ Rights.FLAGS.SELF_DELETE_DISABLE +
+ Rights.FLAGS.DEBTABLE +
+ Rights.FLAGS.KICK_BAN_MEMBERS +
+ Rights.FLAGS.SELF_LEAVE_GROUPS +
+ Rights.FLAGS.SELF_ADD_DISCOVERABLE +
+ Rights.FLAGS.USE_ACHIEVEMENTS +
+ Rights.FLAGS.USE_MASS_INVITES
+ ).toString()
},
login: {
requireCaptcha: false,
@@ -370,6 +405,7 @@ export const DefaultConfigOptions: ConfigValue = {
canLeave: true,
guilds: [],
},
+ defaultFeatures: [],
},
gif: {
enabled: true,
|