- Implemented.
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.
This commit is contained in:
+4
-4
@@ -14,7 +14,7 @@ if ($action === 'export') {
|
||||
$format = strtolower((string)($_GET['format'] ?? 'json'));
|
||||
$export = array_map(function(array $row) use ($canVoiceExport): array {
|
||||
$item = [
|
||||
'id' => (int)$row['id'], 'group_id' => $row['group_id'] ? (int)$row['group_id'] : null,
|
||||
'id' => (int)$row['id'],
|
||||
'username' => $row['username'], 'message' => $row['message'],
|
||||
'type' => $row['message_type'], 'created_at' => date(DATE_ATOM, (int)$row['created_at']),
|
||||
];
|
||||
@@ -28,9 +28,9 @@ if ($action === 'export') {
|
||||
header('Content-Type: text/csv; charset=utf-8');
|
||||
header('Content-Disposition: attachment; filename="' . $filename . '.csv"');
|
||||
$out = fopen('php://output', 'w');
|
||||
fputcsv($out, ['id', 'group_id', 'username', 'message', 'type', 'created_at', 'voice_url']);
|
||||
fputcsv($out, ['id', 'username', 'message', 'type', 'created_at', 'voice_url']);
|
||||
foreach ($export as $row) fputcsv($out, [
|
||||
$row['id'], $row['group_id'], $row['username'], $row['message'], $row['type'],
|
||||
$row['id'], $row['username'], $row['message'], $row['type'],
|
||||
$row['created_at'], $row['voice_url'] ?? '',
|
||||
]);
|
||||
fclose($out);
|
||||
@@ -44,7 +44,7 @@ if ($action === 'export') {
|
||||
|
||||
$payload = array_map(function(array $row): array {
|
||||
return [
|
||||
'id' => (int)$row['id'], 'group_id' => $row['group_id'] ? (int)$row['group_id'] : null,
|
||||
'id' => (int)$row['id'],
|
||||
'message' => $row['message'], 'message_type' => $row['message_type'],
|
||||
'voice_url' => $row['message_type'] === 'voice' && !empty($row['voice_file']) ? voicePublicPath($row['voice_file']) : null,
|
||||
'voice_duration' => $row['voice_duration'] !== null ? (float)$row['voice_duration'] : null,
|
||||
|
||||
Reference in New Issue
Block a user