2881a3b338
When disabled: Group navigation and channel selector are hidden. Group API operations are blocked. Active sessions update automatically. Existing groups and messages remain preserved. Static and browser tests passed with no console errors.
25 lines
1.1 KiB
PHP
25 lines
1.1 KiB
PHP
<?php
|
|
define('CYBERCHAT_API', true);
|
|
require_once __DIR__ . '/../bootstrap.php';
|
|
sendCorsHeaders();
|
|
|
|
$config = getConfig();
|
|
jsonResponse([
|
|
'chat' => [
|
|
'max_message_length' => $config['chat']['max_message_length'] ?? 500,
|
|
'max_username_length' => $config['chat']['max_username_length'] ?? 12,
|
|
'poll_interval_ms' => $config['chat']['poll_interval_ms'] ?? 2000,
|
|
],
|
|
'ui' => $config['ui'] ?? [],
|
|
'security' => ['min_password_length' => $config['security']['min_password_length'] ?? 4],
|
|
'colors' => ['user_palette' => $config['colors']['user_palette'] ?? []],
|
|
'voice' => [
|
|
'enabled' => $config['voice']['enabled'] ?? true,
|
|
'max_duration_seconds' => $config['voice']['max_duration_seconds'] ?? 60,
|
|
'max_upload_bytes' => $config['voice']['max_upload_bytes'] ?? 12582912,
|
|
'auto_play_default' => $config['voice']['auto_play_default'] ?? true,
|
|
],
|
|
'groups' => ['enabled' => $config['groups']['enabled'] ?? true],
|
|
'subscriptions' => ['enabled' => $config['subscriptions']['enabled'] ?? true],
|
|
]);
|