From e14d1003ee82b9a82dfde332a0d1f426a7fe37b6 Mon Sep 17 00:00:00 2001 From: JhumanJ Date: Tue, 8 Apr 2025 15:46:03 +0200 Subject: [PATCH] Enhance FeatureFlagsController to Support Telegram Integration - Added support for Telegram integration in the FeatureFlagsController by including a check for the Telegram bot ID and token in the integrations array. This change aligns with the recent enhancements made to the Telegram notification capabilities, ensuring that the application can properly handle Telegram-related configurations. This update improves the overall functionality of the feature flags, allowing for better integration management and user experience. --- api/app/Http/Controllers/Content/FeatureFlagsController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/app/Http/Controllers/Content/FeatureFlagsController.php b/api/app/Http/Controllers/Content/FeatureFlagsController.php index 046d3ae3..628dbbd6 100644 --- a/api/app/Http/Controllers/Content/FeatureFlagsController.php +++ b/api/app/Http/Controllers/Content/FeatureFlagsController.php @@ -3,12 +3,13 @@ namespace App\Http\Controllers\Content; use App\Http\Controllers\Controller; +use Illuminate\Support\Facades\Cache; class FeatureFlagsController extends Controller { public function index() { - $featureFlags = \Cache::remember('feature_flags', 3600, function () { + $featureFlags = Cache::remember('feature_flags', 3600, function () { return [ 'self_hosted' => config('app.self_hosted', true), 'custom_domains' => config('custom-domains.enabled', false), @@ -35,6 +36,7 @@ class FeatureFlagsController extends Controller 'integrations' => [ 'zapier' => config('services.zapier.enabled'), 'google_sheets' => !empty(config('services.google.client_id')) && !empty(config('services.google.client_secret')), + 'telegram' => !empty(config('services.telegram.bot_id')) && !empty(config('services.telegram.bot_token')), ], ]; });