Added feature flags to server config #334

This commit is contained in:
2023-08-15 20:50:11 +02:00
parent 4b57d7f102
commit 8a0d939147
15 changed files with 74 additions and 25 deletions

View File

@@ -1,3 +1,4 @@
import json
from datetime import datetime
from cpl_core.configuration import ConfigurationModelABC
@@ -236,6 +237,7 @@ class ServerConfig(TableABC, ConfigurationModelABC):
`HelpVoiceChannelId`,
`TeamChannelId`,
`LoginMessageChannelId`,
`FeatureFlags`,
`ServerId`
) VALUES (
{self._message_delete_timer},
@@ -251,6 +253,7 @@ class ServerConfig(TableABC, ConfigurationModelABC):
{self._help_voice_channel_id},
{self._team_channel_id},
{self._login_message_channel_id},
'{json.dumps(self._feature_flags)}',
{self._server.id}
);
"""
@@ -274,6 +277,7 @@ class ServerConfig(TableABC, ConfigurationModelABC):
`HelpVoiceChannelId` = {self._help_voice_channel_id},
`TeamChannelId` = {self._team_channel_id},
`LoginMessageChannelId` = {self._login_message_channel_id},
`FeatureFlags` = '{json.dumps(self._feature_flags)}',
`ServerId` = {self._server.id}
WHERE `Id` = {self._id};
"""