comparison src/get_chat.js.luan @ 73:a63faf49e1d7

last seen
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 08 Mar 2025 20:26:19 -0700
parents 329c3f70fd78
children b5a316575e64
comparison
equal deleted inserted replaced
72:bce0480721c1 73:a63faf49e1d7
66 for _, user_id in ipairs(chat.user_ids) do 66 for _, user_id in ipairs(chat.user_ids) do
67 local user = get_user_by_id(user_id) 67 local user = get_user_by_id(user_id)
68 local name = user.name 68 local name = user.name
69 local email = user.email 69 local email = user.email
70 local voice_url = user.voice_url 70 local voice_url = user.voice_url
71 local voice = voice_url and `%> <a href="<%=voice_url%>" title="Call" target="voice"><img phone src="/images/call.svg"><%` or "" 71 local voice = voice_url and `%> <a href="<%=voice_url%>" title="Call" target="voice"><img phone src="/images/call.svg"></a><%` or ""
72 %> 72 %>
73 <p> 73 <p>
74 <% 74 <%
75 if name == nil then 75 if name == nil then
76 %> 76 %>
77 <b><%=html_encode(email)%></b><%=voice%> 77 <b><%=html_encode(email)%></b><%=voice%><br>
78 <% 78 <%
79 else 79 else
80 %> 80 %>
81 <b><%=html_encode(name)%></b><%=voice%><br> 81 <b><%=html_encode(name)%></b><%=voice%><br>
82 <%=html_encode(email)%> 82 <%=html_encode(email)%><br>
83 <% 83 <%
84 end 84 end
85 %> 85 %>
86 <span last_seen="<%=user_id%>"></span>
86 </p> 87 </p>
87 <% 88 <%
88 end 89 end
89 end 90 end
90 91