current state

This commit is contained in:
2026-02-08 10:42:01 +01:00
parent 0a4372c40d
commit e055af9248
70 changed files with 4882 additions and 330 deletions

View File

@@ -22,7 +22,7 @@ class Chat
return;
}
$last = DB::connection('legacy')->table('chat')
$last = DB::table('chat')
->select('message')
->where('user_id', $userId)
->orderByDesc('chat_id')
@@ -30,7 +30,7 @@ class Chat
->first();
if (!$last || ($last->message ?? '') !== $tekst) {
DB::connection('legacy')->table('chat')->insert([
DB::table('chat')->insert([
'time' => now(),
'sender' => $username,
'user_id' => $userId,
@@ -43,7 +43,7 @@ class Chat
{
$output = "<ul>";
$chats = DB::connection('legacy')->table('chat')
$chats = DB::table('chat')
->select('time', 'sender', 'message')
->orderByDesc('chat_id')
->limit((int)$num_rows ?: 8)