- Configurable tier-based Auto Play with a saved user toggle.
Admin tier assignment without payment via Users > Edit > Tier Override. Fixed live group membership refresh, polling, unread indicators, and incoming voice clip population. Added asset cache busting so clients receive the fixes immediately.
This commit is contained in:
@@ -50,6 +50,9 @@ function sendTextMessage(): never {
|
||||
VALUES (?,?,?,?,?,?,?)")->execute([
|
||||
$user['id'], $groupId, $user['username'], $user['color'], $message, $created, dayKey(),
|
||||
]);
|
||||
if ($groupId !== null) {
|
||||
$db->prepare("UPDATE chat_groups SET updated_at=? WHERE id=?")->execute([$created, $groupId]);
|
||||
}
|
||||
trackEvent('message_text', '/api/messages.php', (int)$user['id']);
|
||||
jsonResponse(['success' => true, 'message' => messagePayload([
|
||||
'id' => $db->lastInsertId(), 'group_id' => $groupId, 'username' => $user['username'],
|
||||
@@ -95,6 +98,9 @@ function sendVoiceMessage(): never {
|
||||
$user['id'], $groupId, $user['username'], $user['color'], '[Voice clip]',
|
||||
$filename, $storedMime, $duration, $created, dayKey(),
|
||||
]);
|
||||
if ($groupId !== null) {
|
||||
$db->prepare("UPDATE chat_groups SET updated_at=? WHERE id=?")->execute([$created, $groupId]);
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
deleteVoiceFile($filename);
|
||||
throw $e;
|
||||
@@ -165,6 +171,7 @@ function pollMessages(): never {
|
||||
'messages' => array_map('messagePayload', $rows),
|
||||
'online' => (int)$onlineStmt->fetchColumn(),
|
||||
'recording' => $recording,
|
||||
'groups' => userGroups((int)$user['id']),
|
||||
'group_id' => $groupId,
|
||||
'server_time' => time(),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user