diff --git a/bot/src/bot_data/model/server_config.py b/bot/src/bot_data/model/server_config.py index d568f953..271329b0 100644 --- a/bot/src/bot_data/model/server_config.py +++ b/bot/src/bot_data/model/server_config.py @@ -321,6 +321,7 @@ class ServerConfig(TableABC, ConfigurationModelABC): `DefaultRoleId`, `ShortRoleNameSetOnlyHighest`, `GameOfferNotificationChatId`, + `ResetMemberAfterRejoin`, `FeatureFlags`, `ServerId` ) VALUES ( @@ -341,6 +342,7 @@ class ServerConfig(TableABC, ConfigurationModelABC): {"NULL" if self._default_role_id is None else self._default_role_id}, {self._short_role_name_only_set_highest_role}, {self._game_offer_notification_chat_id}, + {self._reset_member_after_rejoin}, '{json.dumps(self._feature_flags)}', {self._server.id} ); @@ -369,6 +371,7 @@ class ServerConfig(TableABC, ConfigurationModelABC): `DefaultRoleId` = {"NULL" if self._default_role_id is None else self._default_role_id}, `ShortRoleNameSetOnlyHighest` = {self._short_role_name_only_set_highest_role}, `GameOfferNotificationChatId` = {self._game_offer_notification_chat_id}, + `ResetMemberAfterRejoin` = {self._reset_member_after_rejoin}, `FeatureFlags` = '{json.dumps(self._feature_flags)}', `ServerId` = {self._server.id} WHERE `Id` = {self._id}; diff --git a/bot/src/bot_graphql/graphql/serverConfig.gql b/bot/src/bot_graphql/graphql/serverConfig.gql index ca6c17c7..a35b5a18 100644 --- a/bot/src/bot_graphql/graphql/serverConfig.gql +++ b/bot/src/bot_graphql/graphql/serverConfig.gql @@ -51,7 +51,7 @@ type ServerConfigHistory implements HistoryTableQuery { loginMessageChannelId: String defaultRoleId: String shortRoleNameOnlySetHighestRole: Boolean - gameOfferNotificationChatId: String + resetMemberAfterRejoin: Boolean featureFlagCount: Int featureFlags: [FeatureFlag] @@ -104,6 +104,7 @@ input ServerConfigInput { defaultRoleId: String shortRoleNameOnlySetHighestRole: Boolean gameOfferNotificationChatId: String + resetMemberAfterRejoin: Boolean featureFlags: [FeatureFlagInput] afkChannelIds: [String] diff --git a/web/src/app/models/config/server-config.model.ts b/web/src/app/models/config/server-config.model.ts index 616dbecc..bf31a525 100644 --- a/web/src/app/models/config/server-config.model.ts +++ b/web/src/app/models/config/server-config.model.ts @@ -20,6 +20,7 @@ export interface ServerConfig extends DataWithHistory { defaultRoleId?: string; shortRoleNameOnlySetHighestRole?: boolean; gameOfferNotificationChatId?: string; + resetMemberAfterRejoin?: boolean; featureFlags: FeatureFlag[]; afkChannelIds: string[]; moderatorRoleIds: string[]; diff --git a/web/src/app/models/graphql/mutations.model.ts b/web/src/app/models/graphql/mutations.model.ts index bdac7b0c..586f3928 100644 --- a/web/src/app/models/graphql/mutations.model.ts +++ b/web/src/app/models/graphql/mutations.model.ts @@ -340,6 +340,7 @@ export class Mutations { $defaultRoleId: String, $shortRoleNameOnlySetHighestRole: Boolean, $gameOfferNotificationChatId: String, + $resetMemberAfterRejoin: Boolean, $featureFlags: [FeatureFlagInput], $afkChannelIds: [String], $moderatorRoleIds: [String], @@ -365,6 +366,7 @@ export class Mutations { defaultRoleId: $defaultRoleId, shortRoleNameOnlySetHighestRole: $shortRoleNameOnlySetHighestRole, gameOfferNotificationChatId: $gameOfferNotificationChatId, + resetMemberAfterRejoin: $resetMemberAfterRejoin, featureFlags: $featureFlags, afkChannelIds: $afkChannelIds, moderatorRoleIds: $moderatorRoleIds, @@ -388,6 +390,7 @@ export class Mutations { defaultRoleId shortRoleNameOnlySetHighestRole gameOfferNotificationChatId + resetMemberAfterRejoin featureFlags { key value diff --git a/web/src/app/models/graphql/queries.model.ts b/web/src/app/models/graphql/queries.model.ts index d5ceb096..a387b22e 100644 --- a/web/src/app/models/graphql/queries.model.ts +++ b/web/src/app/models/graphql/queries.model.ts @@ -637,6 +637,7 @@ export class Queries { defaultRoleId shortRoleNameOnlySetHighestRole gameOfferNotificationChatId + resetMemberAfterRejoin featureFlags { key value diff --git a/web/src/app/modules/view/server/config/components/config/config.component.html b/web/src/app/modules/view/server/config/components/config/config.component.html index 8bc387f3..1a5fd307 100644 --- a/web/src/app/modules/view/server/config/components/config/config.component.html +++ b/web/src/app/modules/view/server/config/components/config/config.component.html @@ -14,14 +14,16 @@