changeset 85:2158a5950fcd

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 11 Mar 2025 14:13:53 -0600
parents 83fb90276334
children 625ffdf6499d
files src/heartbeat.js.luan
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/heartbeat.js.luan	Tue Mar 11 14:11:12 2025 -0600
+++ b/src/heartbeat.js.luan	Tue Mar 11 14:13:53 2025 -0600
@@ -46,7 +46,13 @@
 <%
 	local chat = Http.request.parameters.chat
 	if chat ~= nil then
-		chat = get_chat_by_id(chat) or error()
+		chat = get_chat_by_id(chat)
+		if chat == nil then
+%>
+			location = '/';
+<%
+			return
+		end
 		local my_user_id = user.id
 		for _, user_id in ipairs(chat.user_ids) do
 			if user_id == my_user_id then continue end