summary refs log tree commit diff
path: root/util
diff options
context:
space:
mode:
authorFeatyre <twooter.0g179@simplelogin.co>2022-01-24 07:21:48 +0000
committerFeatyre <twooter.0g179@simplelogin.co>2022-01-24 07:21:48 +0000
commite3f20f849d089493328314ad7d7518eaea3d862a (patch)
tree294774d318a7baf80f271e71a4346d26523f432d /util
parentMerge branch 'fosscord:master' into master (diff)
downloadserver-e3f20f849d089493328314ad7d7518eaea3d862a.tar.xz
category + discovery + custom status fix, new config
Diffstat (limited to 'util')
-rw-r--r--util/src/entities/Config.ts16
-rw-r--r--util/src/entities/Guild.ts2
-rw-r--r--util/src/entities/User.ts9
3 files changed, 15 insertions, 12 deletions
diff --git a/util/src/entities/Config.ts b/util/src/entities/Config.ts
index 4da65b36..f4a266dc 100644
--- a/util/src/entities/Config.ts
+++ b/util/src/entities/Config.ts
@@ -157,8 +157,12 @@ export interface ConfigValue {
 		available: Region[];
 	};
 	guild: {
-		showAllGuildsInDiscovery: boolean;
-		homeDiscoveryUseRecommendation: boolean; // TODO: Recommendation, privacy concern?
+		discovery: {
+			showAllGuilds: boolean;
+			useRecommendation: boolean; // TODO: Recommendation, privacy concern?
+			offset: number;
+			limit: number;
+		};
 		autoJoin: {
 			enabled: boolean;
 			guilds: string[];
@@ -354,8 +358,12 @@ export const DefaultConfigOptions: ConfigValue = {
 		],
 	},
 	guild: {
-		showAllGuildsInDiscovery: false,
-		homeDiscoveryUseRecommendation: false,
+		discovery: {
+			showAllGuilds: false,
+			useRecommendation: false,
+			offset: 0,
+			limit: 24,
+		},
 		autoJoin: {
 			enabled: true,
 			canLeave: true,
diff --git a/util/src/entities/Guild.ts b/util/src/entities/Guild.ts
index 65ba2ae2..18fa7a0a 100644
--- a/util/src/entities/Guild.ts
+++ b/util/src/entities/Guild.ts
@@ -287,7 +287,7 @@ export class Guild extends BaseClass {
 			default_message_notifications: 1, // defaults effect: setting the push default at mentions-only will save a lot
 			explicit_content_filter: 0,
 			features: [],
-			primary_category_id: 0,
+			primary_category_id: null,
 			id: guild_id,
 			max_members: 250000,
 			max_presences: 250000,
diff --git a/util/src/entities/User.ts b/util/src/entities/User.ts
index 5f2618e0..1027331a 100644
--- a/util/src/entities/User.ts
+++ b/util/src/entities/User.ts
@@ -289,12 +289,7 @@ export const defaultSettings: UserSettings = {
 	animate_stickers: 0,
 	contact_sync_enabled: false,
 	convert_emoticons: false,
-	custom_status: {
-		emoji_id: undefined,
-		emoji_name: undefined,
-		expires_at: undefined,
-		text: undefined,
-	},
+	custom_status: null,
 	default_guilds_restricted: false,
 	detect_platform_accounts: true,
 	developer_mode: false,
@@ -334,7 +329,7 @@ export interface UserSettings {
 		emoji_name?: string;
 		expires_at?: number;
 		text?: string;
-	};
+	} | null;
 	default_guilds_restricted: boolean;
 	detect_platform_accounts: boolean;
 	developer_mode: boolean;