comparison src/active.js.luan @ 77:624654817f99

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 09 Mar 2025 19:29:41 -0600
parents 7ea33179592a
children 3053a4fc10be
comparison
equal deleted inserted replaced
76:4dfe5af67f91 77:624654817f99
1 local Luan = require "luan:Luan.luan" 1 local Luan = require "luan:Luan.luan"
2 local error = Luan.error 2 local error = Luan.error
3 local Http = require "luan:http/Http.luan"
3 local User = require "site:/lib/User.luan" 4 local User = require "site:/lib/User.luan"
4 local current_user = User.current or error() 5 local current_user = User.current or error()
5 local Notify = require "site:/lib/Notify.luan" 6 local Notify = require "site:/lib/Notify.luan"
7 local remove_notify = Notify.remove or error()
8 local Chat = require "site:/lib/Chat.luan"
9 local get_chat_by_id = Chat.get_by_id or error()
6 10
7 11
8 return function() 12 return function()
9 local user = current_user() or error() 13 local user = current_user() or error()
10 Notify.remove(user) 14 remove_notify(user)
15 local chat = Http.request.parameters.chat
16 if chat ~= nil then
17 chat = get_chat_by_id(chat) or error()
18 chat.read(user)
19 end
11 end 20 end