From 928d59e3083a276989a7e79f5e1cd926906e2c41 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Tue, 5 Aug 2025 16:01:12 +0500 Subject: feat: show the room where the message was sent --- web/index.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'web/index.php') diff --git a/web/index.php b/web/index.php index 7e28e06..3f4a87f 100644 --- a/web/index.php +++ b/web/index.php @@ -38,8 +38,9 @@ if (isset($room)) { if (isset($date)) { $user_id = $user ? $user['id'] : "m.user_id"; $room_id = $room ? $room['id'] : "m.room_id"; + $room_column = !$room ? ", r.name AS room" : ""; - $stmt = $db->prepare("SELECT m.id, u.nick, m.command, m.params, m.tags, m.sent_at + $stmt = $db->prepare("SELECT m.id, u.nick, m.command, m.params, m.tags, m.sent_at $room_column FROM messages m JOIN rooms r ON r.id = m.room_id JOIN users u ON u.id = m.user_id @@ -123,6 +124,9 @@ if (!isset($user) && !isset($room)) { + + + @@ -131,6 +135,9 @@ if (!isset($user) && !isset($room)) { + + + -- cgit v1.2.3
TimeRoom Nick Message