ccdbc47642
Replaced polling with a single queued cursor worker, timeout recovery, backoff, deduplication, chronological insertion, and capped DOM history in cyberchat-v4.js. Removed Groups UI, API, configuration, tier features, admin controls, and archive exposure. Legacy group records remain stored but inaccessible. Added configurable polling limits in config.json.
27 lines
1.2 KiB
PHP
27 lines
1.2 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,
|
|
'poll_timeout_ms' => $config['chat']['poll_timeout_ms'] ?? 12000,
|
|
'poll_max_backoff_ms' => $config['chat']['poll_max_backoff_ms'] ?? 15000,
|
|
'max_rendered_messages' => $config['chat']['max_rendered_messages'] ?? 500,
|
|
],
|
|
'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,
|
|
],
|
|
'subscriptions' => ['enabled' => $config['subscriptions']['enabled'] ?? true],
|
|
]);
|