summary refs log tree commit diff
diff options
context:
space:
mode:
authorErkin Alp Güney <erkinalp9035@gmail.com>2022-01-12 16:13:13 +0300
committerGitHub <noreply@github.com>2022-01-12 16:13:13 +0300
commit67282af0b9a88b335b0c2e20301299bc049d50a7 (patch)
tree5477bffe3e5826e629423b4db8713ef77c672acc
parentFix the feature check (diff)
downloadserver-67282af0b9a88b335b0c2e20301299bc049d50a7.tar.xz
update defaults
-rw-r--r--util/src/entities/Guild.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/util/src/entities/Guild.ts b/util/src/entities/Guild.ts
index 00f92679..6a1df4d6 100644
--- a/util/src/entities/Guild.ts
+++ b/util/src/entities/Guild.ts
@@ -213,7 +213,7 @@ export class Guild extends BaseClass {
 	owner: User;
 
 	@Column({ nullable: true })
-	preferred_locale?: string; // only community guilds can choose this
+	preferred_locale?: string;
 
 	@Column({ nullable: true })
 	premium_subscription_count?: number;
@@ -301,22 +301,22 @@ export class Guild extends BaseClass {
 			name: body.name || "Fosscord",
 			icon: await handleFile(`/icons/${guild_id}`, body.icon as string),
 			region: Config.get().regions.default,
-			owner_id: body.owner_id,
+			owner_id: body.owner_id, // TODO: need to figure out a way for ownerless guilds and multiply-owned guilds
 			afk_timeout: 300,
-			default_message_notifications: 0,
+			default_message_notifications: 1, // defaults effect: setting the push default at mentions-only will save a lot
 			explicit_content_filter: 0,
 			features: [],
 			id: guild_id,
 			max_members: 250000,
 			max_presences: 250000,
-			max_video_channel_users: 25,
+			max_video_channel_users: 200,
 			presence_count: 0,
 			member_count: 0, // will automatically be increased by addMember()
 			mfa_level: 0,
 			preferred_locale: "en-US",
 			premium_subscription_count: 0,
 			premium_tier: 0,
-			system_channel_flags: 0,
+			system_channel_flags: 4, // defaults effect: suppress the setup tips to save performance
 			unavailable: false,
 			nsfw: false,
 			nsfw_level: 0,
@@ -326,7 +326,7 @@ export class Guild extends BaseClass {
 				description: "No description",
 				welcome_channels: [],
 			},
-			widget_enabled: false,
+			widget_enabled: true, // NB: don't set it as false to prevent artificial restrictions
 		}).save();
 
 		// we have to create the role _after_ the guild because else we would get a "SQLITE_CONSTRAINT: FOREIGN KEY constraint failed" error
@@ -337,6 +337,7 @@ export class Guild extends BaseClass {
 			color: 0,
 			hoist: false,
 			managed: false,
+			// NB: in Fosscord, every role will be non-managed, as we use user-groups instead of roles for managed groups
 			mentionable: false,
 			name: "@everyone",
 			permissions: String("2251804225"),
@@ -358,7 +359,6 @@ export class Guild extends BaseClass {
 		for (const channel of body.channels?.sort((a, b) => (a.parent_id ? 1 : -1))) {
 			var id = ids.get(channel.id) || Snowflake.generate();
 
-			// TODO: should we abort if parent_id is a category? (to disallow sub category channels)
 			var parent_id = ids.get(channel.parent_id);
 
 			await Channel.createChannel({ ...channel, guild_id, id, parent_id }, body.owner_id, {