Mercurial Hosting > chat
comparison src/added.js.luan @ 54:1d724f187cff
minor fix
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Mon, 03 Mar 2025 21:19:12 -0700 |
| parents | src/active.js.luan@7ea33179592a |
| children |
comparison
equal
deleted
inserted
replaced
| 53:9298b04607ae | 54:1d724f187cff |
|---|---|
| 1 local Luan = require "luan:Luan.luan" | |
| 2 local error = Luan.error | |
| 3 local Http = require "luan:http/Http.luan" | |
| 4 local User = require "site:/lib/User.luan" | |
| 5 local current_user = User.current or error() | |
| 6 local Chat = require "site:/lib/Chat.luan" | |
| 7 local get_chat_by_id = Chat.get_by_id or error() | |
| 8 | |
| 9 | |
| 10 return function() | |
| 11 local user = current_user() or error() | |
| 12 local chat = Http.request.parameters.chat or error() | |
| 13 chat = get_chat_by_id(chat) or error() | |
| 14 chat.read(user) | |
| 15 end |
