Groups is fully removed:

No homepage navigation, Account feature, tier setting, API, or client 
code.
Legacy group tables, entitlements, messages, voice files, and config are 
purged automatically.
New cache-busted client: cyberchat-app.js?v=20260609.3.
Browser and SQLite migration tests passed with no console errors.
This commit is contained in:
Ty Clifford
2026-06-09 00:16:32 -04:00
parent ccdbc47642
commit a1971f9515
11 changed files with 143 additions and 1110 deletions
+2 -7
View File
@@ -30,10 +30,6 @@ function messagePayload(array $row): array {
];
}
function publicMessageCondition(PDO $db): string {
return isset(tableColumns($db, 'messages')['group_id']) ? ' AND group_id IS NULL' : '';
}
function sendTextMessage(): never {
$user = authRequired();
$message = trim((string)($_POST['message'] ?? ''));
@@ -155,17 +151,16 @@ function pollMessages(): never {
$since = max(0, (int)($_GET['since'] ?? 0));
$limit = max(1, min(250, (int)getConfigVal('chat.messages_per_page', 100)));
$db = getDB();
$publicOnly = publicMessageCondition($db);
if ($since === 0) {
$stmt = $db->prepare("SELECT * FROM messages
WHERE day_key=?$publicOnly ORDER BY id DESC LIMIT ?");
WHERE day_key=? ORDER BY id DESC LIMIT ?");
$stmt->execute([dayKey(), $limit]);
$rows = array_reverse($stmt->fetchAll());
$hasMore = false;
} else {
$stmt = $db->prepare("SELECT * FROM messages
WHERE day_key=?$publicOnly AND id>? ORDER BY id LIMIT ?");
WHERE day_key=? AND id>? ORDER BY id LIMIT ?");
$stmt->execute([dayKey(), $since, $limit + 1]);
$rows = $stmt->fetchAll();
$hasMore = count($rows) > $limit;