📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
Added ability to enable or disable integrations fully or partially
Yevhenii Kulisidib713e9429f9f
diff --git a/.env.example b/.env.exampleindex 5510c8ab0..0d037c92b 100644--- a/.env.example+++ b/.env.example@@ -64,6 +64,10 @@ GOOGLE_OAUTH2_CLIENT_SECRET=GITHUB_OAUTH2_CLIENT_ID=GITHUB_OAUTH2_CLIENT_SECRET=+# Integrations+ENABLE_INTEGRATIONS=true+ENABLE_TELEGRAM_INTEGRATION=true+# Telegram integrationTELEGRAM_BOT_TOKEN=''# Telegram webhook (production only)diff --git a/src/app.module.ts b/src/app.module.tsindex 39b2bcccf..dc66dee1a 100644--- a/src/app.module.ts+++ b/src/app.module.ts@@ -69,6 +69,9 @@ if (isTgTokenPresent) {}@Module({- imports: [...modules, IntegrationsModule],+ imports: [+ ...modules,+ ...(process.env.ENABLE_INTEGRATIONS === 'true' ? [IntegrationsModule] : []),+ ],})export class AppModule {}diff --git a/src/integrations/integrations.module.ts b/src/integrations/integrations.module.tsindex b10d1b7d1..18fffd874 100644--- a/src/integrations/integrations.module.ts+++ b/src/integrations/integrations.module.ts@@ -2,6 +2,10 @@ import { Module } from '@nestjs/common'import { TelegramModule } from './telegram/telegram.module'@Module({- imports: [TelegramModule],+ imports: [+ ...(process.env.ENABLE_TELEGRAM_INTEGRATION === 'true'+ ? [TelegramModule]+ : []),+ ],})export class IntegrationsModule {}