eb57cde99f
Per-tier audio bitrate: Free 64, Plus 96, Pro 128 kbps. Configurable text/voice reply threads and depth. Registration/login-only honeypot and internal CAPTCHA. Optional Google reCAPTCHA v2/v3 with server verification. Archive/export support for replies and bitrate. Dashboard controls for all settings. Verified JavaScript, JSON, SQLite migrations, desktop/mobile UI, and browser console. Native PHP lint was unavailable because PHP is not installed. Google implementation follows Siteverify and reCAPTCHA v3.
42 lines
2.2 KiB
PHP
42 lines
2.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,
|
|
'replies_enabled' => $config['chat']['replies_enabled'] ?? true,
|
|
'reply_max_depth' => $config['chat']['reply_max_depth'] ?? 4,
|
|
],
|
|
'ui' => $config['ui'] ?? [],
|
|
'security' => [
|
|
'min_password_length' => $config['security']['min_password_length'] ?? 4,
|
|
'captcha' => [
|
|
'registration_enabled' => $config['security']['captcha']['registration_enabled'] ?? false,
|
|
'login_enabled' => $config['security']['captcha']['login_enabled'] ?? false,
|
|
'honeypot_enabled' => $config['security']['captcha']['honeypot']['enabled'] ?? true,
|
|
'internal_enabled' => $config['security']['captcha']['internal']['enabled'] ?? false,
|
|
'google_enabled' => $config['security']['captcha']['google']['enabled'] ?? false,
|
|
'google_version' => $config['security']['captcha']['google']['version'] ?? 'v2',
|
|
'google_site_key' => $config['security']['captcha']['google']['site_key'] ?? '',
|
|
],
|
|
],
|
|
'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,
|
|
'transcoding_enabled' => $config['voice']['transcoding']['enabled'] ?? false,
|
|
'output_profile' => $config['voice']['transcoding']['profile'] ?? 'm4a_aac',
|
|
],
|
|
'subscriptions' => ['enabled' => $config['subscriptions']['enabled'] ?? true],
|
|
]);
|