comparison 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
comparison
equal deleted inserted replaced
84:83fb90276334 85:2158a5950fcd
44 online = <%=json_string(online,compressed)%>; 44 online = <%=json_string(online,compressed)%>;
45 showOnline(); 45 showOnline();
46 <% 46 <%
47 local chat = Http.request.parameters.chat 47 local chat = Http.request.parameters.chat
48 if chat ~= nil then 48 if chat ~= nil then
49 chat = get_chat_by_id(chat) or error() 49 chat = get_chat_by_id(chat)
50 if chat == nil then
51 %>
52 location = '/';
53 <%
54 return
55 end
50 local my_user_id = user.id 56 local my_user_id = user.id
51 for _, user_id in ipairs(chat.user_ids) do 57 for _, user_id in ipairs(chat.user_ids) do
52 if user_id == my_user_id then continue end 58 if user_id == my_user_id then continue end
53 local user = get_user_by_id(user_id) 59 local user = get_user_by_id(user_id)
54 %> 60 %>