comparison src/heartbeat.js.luan @ 89:3053a4fc10be

spy
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 13 Mar 2025 17:56:39 -0600
parents 2158a5950fcd
children c41e200c3e76
comparison
equal deleted inserted replaced
88:7b339b1ccd11 89:3053a4fc10be
23 local logger = Logging.logger "heartbeat.js" 23 local logger = Logging.logger "heartbeat.js"
24 24
25 25
26 return function() 26 return function()
27 local user = current_user() or error() 27 local user = current_user() or error()
28 set_online(user) 28 local spy = Http.request.cookies.spy ~= nil
29 if not spy then
30 set_online(user)
31 end
29 Io.stdout = Http.response.text_writer() 32 Io.stdout = Http.response.text_writer()
30 33
31 local last_update = Http.request.parameters.last_update or error() 34 local last_update = Http.request.parameters.last_update or error()
32 last_update = to_number(last_update) or error(last_update) 35 last_update = to_number(last_update) or error(last_update)
33 local user_last_update = user.last_update() 36 local user_last_update = user.last_update()