Mercurial Hosting > chat
diff src/heartbeat.js.luan @ 111:37ab261aee7b default tip
notify fix
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 16 Sep 2025 00:01:53 -0600 |
parents | 62d6725b4db0 |
children |
line wrap: on
line diff
--- a/src/heartbeat.js.luan Mon Sep 15 13:29:10 2025 -0600 +++ b/src/heartbeat.js.luan Tue Sep 16 00:01:53 2025 -0600 @@ -20,6 +20,8 @@ local get_online = Online.get or error() local Chat = require "site:/lib/Chat.luan" local get_chat_by_id = Chat.get_by_id or error() +local Notify = require "site:/lib/Notify.luan" +local notify_active = Notify.active or error() local Logging = require "luan:logging/Logging.luan" local logger = Logging.logger "heartbeat.js" @@ -47,6 +49,11 @@ return end + local focus = Http.request.parameters.focus or error() + if focus == "true" then + notify_active(user) + end + local online = get_online(user) %> online = <%=json_string(online,compressed)%>;