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.
This commit is contained in:
JhumanJ 2025-04-08 15:46:03 +02:00
parent 865eac19cb
commit e14d1003ee
1 changed files with 3 additions and 1 deletions

View File

@ -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')),
],
];
});