Mercurial Hosting > chat
diff src/index.html.luan @ 46:42b741a1d5c6
add username
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 28 Feb 2025 19:25:12 -0700 |
parents | 436216d17a1b |
children | 7628fd0e3560 |
line wrap: on
line diff
--- a/src/index.html.luan Fri Feb 28 14:37:11 2025 -0700 +++ b/src/index.html.luan Fri Feb 28 19:25:12 2025 -0700 @@ -7,6 +7,8 @@ local concat = Table.concat or error() local is_empty = Table.is_empty or error() local size = Table.size or error() +local Parsers = require "luan:Parsers.luan" +local json_string = Parsers.json_string or error() local Io = require "luan:Io.luan" local Http = require "luan:http/Http.luan" local Shared = require "site:/lib/Shared.luan" @@ -63,8 +65,8 @@ end return function() - local with = Http.request.parameters.with - with = to_set(with) + local with_email = Http.request.parameters.with + local with = to_set(with_email) local user = current_user() if user == nil then local url = "/login.html" @@ -148,7 +150,7 @@ if selected ~= nil then %> let div = document.querySelector('div[chat="<%=selected.id%>"]'); - selectChat(div); + selectChat(div,<%=json_string(with_email)%>); <% end %>