Mercurial Hosting > chat
diff src/heartbeat.js.luan @ 85:2158a5950fcd
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 11 Mar 2025 14:13:53 -0600 |
parents | 377bdda60f0b |
children | 3053a4fc10be |
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