snapshot of https://github.com/RocketChat/Rocket.Chat.git (develop, 2026-09-16; blobs > 131072B omitted)
Some checks failed
Create issues from TODOs / todos (push) Failing after 3s
Close inactive issues / close-issues (push) Has been cancelled
Deploy GitHub Pages / deploy-preview (push) Has been cancelled
CI / ⚙️ Variables Setup (push) Has been cancelled
CI / ⚙️ Test Guard (push) Has been cancelled
CI / 🚀 Notify external services - draft (push) Has been cancelled
CI / 📦 Build Packages (push) Has been cancelled
CI / 📦 Meteor Build (coverage) (push) Has been cancelled
CI / 📦 Meteor Build (production) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], fips) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Publish Docker Images (ghcr.io) (push) Has been cancelled
CI / 📦 Track Image Sizes (push) Has been cancelled
CI / 🔎 Code Check - Action Lint (push) Has been cancelled
CI / 🔎 Code Check (push) Has been cancelled
CI / 🔨 Test Storybook (push) Has been cancelled
CI / 🔨 Test Unit (push) Has been cancelled
CI / 🔨 Test API (CE) (push) Has been cancelled
CI / 🔨 Test API Livechat (CE) (push) Has been cancelled
CI / 🔨 Test UI (CE) (push) Has been cancelled
CI / 🔨 Test API (EE) (push) Has been cancelled
CI / 🔨 Test API Livechat (EE) (push) Has been cancelled
CI / 🔨 Test API Apps (deno-runtime - EE) (push) Has been cancelled
CI / 🔨 Test UI (EE) (push) Has been cancelled
CI / 🔨 Test API (FIPS) (push) Has been cancelled
CI / 🔨 Test API Livechat (FIPS) (push) Has been cancelled
CI / 🔨 Test UI (FIPS) (push) Has been cancelled
CI / 🔨 Test Federation Matrix (push) Has been cancelled
CI / 📊 Report Coverage (push) Has been cancelled
CI / ✅ Tests Done (push) Has been cancelled
CI / 🚀 Publish build assets (push) Has been cancelled
CI / 🚀 Publish Docker Images (DockerHub) (push) Has been cancelled
CI / 🚀 Notify external services (push) Has been cancelled
CI / Update Version Durability (push) Has been cancelled
Release / Release (push) Has been cancelled
Auto-close duplicate issues / auto-close-duplicates (push) Failing after 1s
Code scanning - action / CodeQL-Build (push) Failing after 1s
Some checks failed
Create issues from TODOs / todos (push) Failing after 3s
Close inactive issues / close-issues (push) Has been cancelled
Deploy GitHub Pages / deploy-preview (push) Has been cancelled
CI / ⚙️ Variables Setup (push) Has been cancelled
CI / ⚙️ Test Guard (push) Has been cancelled
CI / 🚀 Notify external services - draft (push) Has been cancelled
CI / 📦 Build Packages (push) Has been cancelled
CI / 📦 Meteor Build (coverage) (push) Has been cancelled
CI / 📦 Meteor Build (production) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], fips) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Publish Docker Images (ghcr.io) (push) Has been cancelled
CI / 📦 Track Image Sizes (push) Has been cancelled
CI / 🔎 Code Check - Action Lint (push) Has been cancelled
CI / 🔎 Code Check (push) Has been cancelled
CI / 🔨 Test Storybook (push) Has been cancelled
CI / 🔨 Test Unit (push) Has been cancelled
CI / 🔨 Test API (CE) (push) Has been cancelled
CI / 🔨 Test API Livechat (CE) (push) Has been cancelled
CI / 🔨 Test UI (CE) (push) Has been cancelled
CI / 🔨 Test API (EE) (push) Has been cancelled
CI / 🔨 Test API Livechat (EE) (push) Has been cancelled
CI / 🔨 Test API Apps (deno-runtime - EE) (push) Has been cancelled
CI / 🔨 Test UI (EE) (push) Has been cancelled
CI / 🔨 Test API (FIPS) (push) Has been cancelled
CI / 🔨 Test API Livechat (FIPS) (push) Has been cancelled
CI / 🔨 Test UI (FIPS) (push) Has been cancelled
CI / 🔨 Test Federation Matrix (push) Has been cancelled
CI / 📊 Report Coverage (push) Has been cancelled
CI / ✅ Tests Done (push) Has been cancelled
CI / 🚀 Publish build assets (push) Has been cancelled
CI / 🚀 Publish Docker Images (DockerHub) (push) Has been cancelled
CI / 🚀 Notify external services (push) Has been cancelled
CI / Update Version Durability (push) Has been cancelled
Release / Release (push) Has been cancelled
Auto-close duplicate issues / auto-close-duplicates (push) Failing after 1s
Code scanning - action / CodeQL-Build (push) Failing after 1s
This commit is contained in:
507
apps/meteor/server/settings/message.ts
Normal file
507
apps/meteor/server/settings/message.ts
Normal file
@@ -0,0 +1,507 @@
|
||||
import { settingsRegistry } from '.';
|
||||
import { MessageTypesValues } from '../../app/lib/lib/MessageTypes';
|
||||
|
||||
export const createMessageSettings = () =>
|
||||
settingsRegistry.addGroup('Message', async function () {
|
||||
await this.section('Message_Attachments', async function () {
|
||||
await this.add('Message_Attachments_Thumbnails_Enabled', true, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
i18nDescription: 'Message_Attachments_Thumbnails_EnabledDesc',
|
||||
});
|
||||
|
||||
await this.add('Message_Attachments_Thumbnails_Width', 480, {
|
||||
type: 'int',
|
||||
public: true,
|
||||
enableQuery: [
|
||||
{
|
||||
_id: 'Message_Attachments_Thumbnails_Enabled',
|
||||
value: true,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
await this.add('Message_Attachments_Thumbnails_Height', 360, {
|
||||
type: 'int',
|
||||
public: true,
|
||||
enableQuery: [
|
||||
{
|
||||
_id: 'Message_Attachments_Thumbnails_Enabled',
|
||||
value: true,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
await this.add('Message_Attachments_Strip_Exif', true, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
i18nDescription: 'Message_Attachments_Strip_ExifDescription',
|
||||
});
|
||||
});
|
||||
await this.section('Message_Audio', async function () {
|
||||
await this.add('Message_AudioRecorderEnabled', true, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
i18nDescription: 'Message_AudioRecorderEnabledDescription',
|
||||
});
|
||||
await this.add('Message_Audio_bitRate', 32, {
|
||||
type: 'int',
|
||||
public: true,
|
||||
});
|
||||
});
|
||||
await this.section('Read_Receipts', async function () {
|
||||
await this.add('Message_Read_Receipt_Enabled', false, {
|
||||
type: 'boolean',
|
||||
enterprise: true,
|
||||
invalidValue: false,
|
||||
modules: ['message-read-receipt'],
|
||||
public: true,
|
||||
});
|
||||
await this.add('Message_Read_Receipt_Store_Users', false, {
|
||||
type: 'boolean',
|
||||
enterprise: true,
|
||||
invalidValue: false,
|
||||
modules: ['message-read-receipt'],
|
||||
public: true,
|
||||
enableQuery: { _id: 'Message_Read_Receipt_Enabled', value: true },
|
||||
});
|
||||
await this.add('Message_Read_Receipt_Archive_Enabled', false, {
|
||||
type: 'boolean',
|
||||
enterprise: true,
|
||||
invalidValue: false,
|
||||
modules: ['message-read-receipt'],
|
||||
i18nDescription: 'Message_Read_Receipt_Archive_Enabled_Description',
|
||||
alert: 'Message_Read_Receipt_Archive_Enabled_Alert',
|
||||
enableQuery: { _id: 'Message_Read_Receipt_Store_Users', value: true },
|
||||
});
|
||||
await this.add('Message_Read_Receipt_Archive_Retention_Days', 30, {
|
||||
type: 'int',
|
||||
enterprise: true,
|
||||
invalidValue: 30,
|
||||
modules: ['message-read-receipt'],
|
||||
i18nDescription: 'Message_Read_Receipt_Archive_Retention_Days_Description',
|
||||
enableQuery: [
|
||||
{ _id: 'Message_Read_Receipt_Store_Users', value: true },
|
||||
{ _id: 'Message_Read_Receipt_Archive_Enabled', value: true },
|
||||
],
|
||||
});
|
||||
await this.add('Message_Read_Receipt_Archive_Cron', '0 2 * * *', {
|
||||
type: 'string',
|
||||
enterprise: true,
|
||||
invalidValue: '0 2 * * *',
|
||||
modules: ['message-read-receipt'],
|
||||
i18nDescription: 'Message_Read_Receipt_Archive_Cron_Description',
|
||||
enableQuery: [
|
||||
{ _id: 'Message_Read_Receipt_Store_Users', value: true },
|
||||
{ _id: 'Message_Read_Receipt_Archive_Enabled', value: true },
|
||||
],
|
||||
});
|
||||
await this.add('Message_Read_Receipt_Archive_Batch_Size', 10000, {
|
||||
type: 'int',
|
||||
enterprise: true,
|
||||
invalidValue: 10000,
|
||||
modules: ['message-read-receipt'],
|
||||
i18nDescription: 'Message_Read_Receipt_Archive_Batch_Size_Description',
|
||||
enableQuery: [
|
||||
{ _id: 'Message_Read_Receipt_Store_Users', value: true },
|
||||
{ _id: 'Message_Read_Receipt_Archive_Enabled', value: true },
|
||||
],
|
||||
});
|
||||
});
|
||||
await this.add('Message_CustomDomain_AutoLink', '', {
|
||||
type: 'string',
|
||||
public: true,
|
||||
});
|
||||
await this.add('Message_AllowEditing', true, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
});
|
||||
await this.add('Message_AllowEditing_BlockEditInMinutes', 0, {
|
||||
type: 'int',
|
||||
public: true,
|
||||
i18nDescription: 'Message_AllowEditing_BlockEditInMinutesDescription',
|
||||
});
|
||||
await this.add('Message_AllowDeleting', true, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
});
|
||||
await this.add('Message_AllowDeleting_BlockDeleteInMinutes', 0, {
|
||||
type: 'int',
|
||||
public: true,
|
||||
i18nDescription: 'Message_AllowDeleting_BlockDeleteInMinutes',
|
||||
});
|
||||
await this.add('Message_AllowUnrecognizedSlashCommand', false, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
});
|
||||
await this.add('Message_AllowDirectMessagesToYourself', true, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
});
|
||||
await this.add('Message_AlwaysSearchRegExp', false, {
|
||||
type: 'boolean',
|
||||
});
|
||||
await this.add('Message_ShowDeletedStatus', false, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
});
|
||||
await this.add('Message_AllowBadWordsFilter', false, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
});
|
||||
await this.add('Message_BadWordsFilterList', '', {
|
||||
type: 'string',
|
||||
public: true,
|
||||
});
|
||||
await this.add('Message_BadWordsWhitelist', '', {
|
||||
type: 'string',
|
||||
public: true,
|
||||
});
|
||||
await this.add('Message_KeepHistory', false, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
});
|
||||
await this.add('Message_MaxAll', 0, {
|
||||
type: 'int',
|
||||
public: true,
|
||||
});
|
||||
await this.add('Message_MaxAllowedSize', 5000, {
|
||||
type: 'int',
|
||||
public: true,
|
||||
});
|
||||
await this.add('Message_AllowConvertLongMessagesToAttachment', true, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
});
|
||||
await this.add('Message_GroupingPeriod', 300, {
|
||||
type: 'int',
|
||||
public: true,
|
||||
i18nDescription: 'Message_GroupingPeriodDescription',
|
||||
});
|
||||
await this.add('API_Embed', true, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
});
|
||||
await this.add(
|
||||
'API_Embed_UserAgent',
|
||||
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36',
|
||||
{
|
||||
type: 'string',
|
||||
public: true,
|
||||
},
|
||||
);
|
||||
await this.add('API_EmbedCacheExpirationDays', 30, {
|
||||
type: 'int',
|
||||
public: false,
|
||||
});
|
||||
await this.add('API_Embed_clear_cache_now', 'OEmbedCacheCleanup', {
|
||||
type: 'action',
|
||||
actionText: 'clear',
|
||||
i18nLabel: 'clear_cache_now',
|
||||
});
|
||||
// TODO: deprecate this setting in favor of App
|
||||
await this.add('API_EmbedIgnoredHosts', 'localhost, 127.0.0.1, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16', {
|
||||
type: 'string',
|
||||
i18nDescription: 'API_EmbedIgnoredHosts_Description',
|
||||
});
|
||||
// TODO: deprecate this setting in favor of App
|
||||
await this.add('API_EmbedSafePorts', '80, 443', {
|
||||
type: 'string',
|
||||
});
|
||||
await this.add('API_EmbedTimeout', 10, {
|
||||
type: 'int',
|
||||
enableQuery: { _id: 'API_Embed', value: true },
|
||||
});
|
||||
await this.add('Message_TimeFormat', 'LT', {
|
||||
type: 'string',
|
||||
public: true,
|
||||
i18nDescription: 'Message_TimeFormat_Description',
|
||||
});
|
||||
await this.add('Message_DateFormat', 'LL', {
|
||||
type: 'string',
|
||||
public: true,
|
||||
i18nDescription: 'Message_DateFormat_Description',
|
||||
});
|
||||
await this.add('Message_TimeAndDateFormat', 'LLL', {
|
||||
type: 'string',
|
||||
public: true,
|
||||
i18nDescription: 'Message_TimeAndDateFormat_Description',
|
||||
});
|
||||
await this.add('Message_QuoteChainLimit', 2, {
|
||||
type: 'int',
|
||||
public: true,
|
||||
});
|
||||
|
||||
await this.add('Hide_System_Messages', [], {
|
||||
type: 'multiSelect',
|
||||
public: true,
|
||||
values: MessageTypesValues,
|
||||
});
|
||||
|
||||
await this.add('DirectMesssage_maxUsers', 8, {
|
||||
type: 'int',
|
||||
public: true,
|
||||
});
|
||||
|
||||
await this.add('Message_ErasureType', 'Delete', {
|
||||
type: 'select',
|
||||
public: true,
|
||||
i18nDescription: 'Message_ErasureType_Description',
|
||||
values: [
|
||||
{
|
||||
key: 'Keep',
|
||||
i18nLabel: 'Message_ErasureType_Keep',
|
||||
},
|
||||
{
|
||||
key: 'Delete',
|
||||
i18nLabel: 'Message_ErasureType_Delete',
|
||||
},
|
||||
{
|
||||
key: 'Unlink',
|
||||
i18nLabel: 'Message_ErasureType_Unlink',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
await this.add(
|
||||
'Message_Code_highlight',
|
||||
'javascript,css,markdown,dockerfile,json,go,rust,clean,bash,plaintext,powershell,scss,shell,yaml,vim',
|
||||
{
|
||||
type: 'string',
|
||||
public: true,
|
||||
},
|
||||
);
|
||||
await this.add('Message_Auditing_Panel_Load_Count', 0, {
|
||||
type: 'int',
|
||||
hidden: true,
|
||||
});
|
||||
await this.add('Message_Auditing_Apply_Count', 0, {
|
||||
type: 'int',
|
||||
hidden: true,
|
||||
});
|
||||
await this.add('Message_VideoRecorderEnabled', true, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
i18nDescription: 'Message_VideoRecorderEnabledDescription',
|
||||
});
|
||||
await this.add('AutoTranslate_Enabled', false, {
|
||||
type: 'boolean',
|
||||
group: 'Message',
|
||||
section: 'AutoTranslate',
|
||||
public: true,
|
||||
});
|
||||
|
||||
await this.add('AutoTranslate_AutoEnableOnJoinRoom', false, {
|
||||
type: 'boolean',
|
||||
group: 'Message',
|
||||
section: 'AutoTranslate',
|
||||
public: true,
|
||||
enableQuery: [{ _id: 'AutoTranslate_Enabled', value: true }],
|
||||
});
|
||||
|
||||
await this.add('AutoTranslate_ServiceProvider', 'google-translate', {
|
||||
type: 'select',
|
||||
group: 'Message',
|
||||
section: 'AutoTranslate',
|
||||
values: [
|
||||
{
|
||||
key: 'google-translate',
|
||||
i18nLabel: 'AutoTranslate_Google',
|
||||
},
|
||||
{
|
||||
key: 'deepl-translate',
|
||||
i18nLabel: 'AutoTranslate_DeepL',
|
||||
},
|
||||
{
|
||||
key: 'microsoft-translate',
|
||||
i18nLabel: 'AutoTranslate_Microsoft',
|
||||
},
|
||||
{
|
||||
key: 'libre-translate',
|
||||
i18nLabel: 'AutoTranslate_LibreTranslate',
|
||||
},
|
||||
],
|
||||
enableQuery: [{ _id: 'AutoTranslate_Enabled', value: true }],
|
||||
i18nLabel: 'AutoTranslate_ServiceProvider',
|
||||
public: true,
|
||||
});
|
||||
|
||||
await this.add('AutoTranslate_GoogleAPIKey', '', {
|
||||
type: 'string',
|
||||
group: 'Message',
|
||||
section: 'AutoTranslate_Google',
|
||||
public: false,
|
||||
i18nLabel: 'AutoTranslate_APIKey',
|
||||
enableQuery: [
|
||||
{
|
||||
_id: 'AutoTranslate_Enabled',
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
_id: 'AutoTranslate_ServiceProvider',
|
||||
value: 'google-translate',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
await this.add('AutoTranslate_DeepLAPIKey', '', {
|
||||
type: 'string',
|
||||
group: 'Message',
|
||||
section: 'AutoTranslate_DeepL',
|
||||
public: false,
|
||||
i18nLabel: 'AutoTranslate_APIKey',
|
||||
enableQuery: [
|
||||
{
|
||||
_id: 'AutoTranslate_Enabled',
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
_id: 'AutoTranslate_ServiceProvider',
|
||||
value: 'deepl-translate',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
await this.add('AutoTranslate_MicrosoftAPIKey', '', {
|
||||
type: 'string',
|
||||
group: 'Message',
|
||||
section: 'AutoTranslate_Microsoft',
|
||||
public: false,
|
||||
i18nLabel: 'AutoTranslate_Microsoft_API_Key',
|
||||
enableQuery: [
|
||||
{
|
||||
_id: 'AutoTranslate_Enabled',
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
_id: 'AutoTranslate_ServiceProvider',
|
||||
value: 'microsoft-translate',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
await this.add('AutoTranslate_LibreTranslateAPIURL', '', {
|
||||
type: 'string',
|
||||
group: 'Message',
|
||||
section: 'AutoTranslate_LibreTranslate',
|
||||
public: false,
|
||||
i18nLabel: 'AutoTranslate_LibreTranslate_API_URL',
|
||||
enableQuery: [
|
||||
{
|
||||
_id: 'AutoTranslate_Enabled',
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
_id: 'AutoTranslate_ServiceProvider',
|
||||
value: 'libre-translate',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
await this.add('AutoTranslate_LibreTranslateAPIKey', '', {
|
||||
type: 'string',
|
||||
group: 'Message',
|
||||
section: 'AutoTranslate_LibreTranslate',
|
||||
public: false,
|
||||
secret: true,
|
||||
i18nLabel: 'AutoTranslate_APIKey',
|
||||
enableQuery: [
|
||||
{
|
||||
_id: 'AutoTranslate_Enabled',
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
_id: 'AutoTranslate_ServiceProvider',
|
||||
value: 'libre-translate',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
await this.add('HexColorPreview_Enabled', true, {
|
||||
type: 'boolean',
|
||||
i18nLabel: 'Enabled',
|
||||
group: 'Message',
|
||||
section: 'Hex_Color_Preview',
|
||||
public: true,
|
||||
});
|
||||
|
||||
await this.section('Katex', async function () {
|
||||
const enableQuery = {
|
||||
_id: 'Katex_Enabled',
|
||||
value: true,
|
||||
};
|
||||
await this.add('Katex_Enabled', true, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
i18nDescription: 'Katex_Enabled_Description',
|
||||
});
|
||||
await this.add('Katex_Parenthesis_Syntax', true, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
enableQuery,
|
||||
i18nDescription: 'Katex_Parenthesis_Syntax_Description',
|
||||
});
|
||||
await this.add('Katex_Dollar_Syntax', false, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
enableQuery,
|
||||
i18nDescription: 'Katex_Dollar_Syntax_Description',
|
||||
});
|
||||
});
|
||||
|
||||
await this.section('Google Maps', async function () {
|
||||
await this.add('MapView_Enabled', false, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
i18nLabel: 'MapView_Enabled',
|
||||
i18nDescription: 'MapView_Enabled_Description',
|
||||
});
|
||||
await this.add('MapView_GMapsAPIKey', '', {
|
||||
type: 'string',
|
||||
public: true,
|
||||
i18nLabel: 'MapView_GMapsAPIKey',
|
||||
i18nDescription: 'MapView_GMapsAPIKey_Description',
|
||||
secret: true,
|
||||
});
|
||||
});
|
||||
|
||||
await this.add('Message_AllowPinning', true, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
});
|
||||
await this.add('Message_AllowStarring', true, {
|
||||
type: 'boolean',
|
||||
public: true,
|
||||
});
|
||||
|
||||
await this.add('Message_CustomFields_Enabled', false, {
|
||||
type: 'boolean',
|
||||
});
|
||||
await this.add(
|
||||
'Message_CustomFields',
|
||||
`
|
||||
{
|
||||
"properties": {
|
||||
"priority": {
|
||||
"type": "string",
|
||||
"nullable": false,
|
||||
"enum": ["low", "medium", "high"]
|
||||
}
|
||||
},
|
||||
"required": ["priority"]
|
||||
}
|
||||
`,
|
||||
{
|
||||
type: 'code',
|
||||
code: 'application/json',
|
||||
invalidValue: '',
|
||||
multiline: true,
|
||||
enableQuery: [
|
||||
{
|
||||
_id: 'Message_CustomFields_Enabled',
|
||||
value: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user