local Luan = require "luan:Luan.luan" local error = Luan.error local Io = require "luan:Io.luan" local Http = require "luan:http/Http.luan" local Shared = require "site:/lib/Shared.luan" local head = Shared.head or error() local header = Shared.header or error() local started = Shared.started or error() local chats_html = Shared.chats_html or error() local User = require "site:/lib/User.luan" local current_user = User.current or error() local Chat = require "site:/lib/Chat.luan" local get_chat_by_id = Chat.get_by_id or error() local Logging = require "luan:logging/Logging.luan" local logger = Logging.logger "index.html" return function() local user = current_user() if user == nil then Http.response.send_redirect("/login.html") return end local user_id = user.id local chat = Http.request.parameters.chat chat = chat and get_chat_by_id(chat) Io.stdout = Http.response.text_writer() %> <% head() %> <% header() %>
<% chats_html() %>

Choose a chat on the left

or

Chat with another person



Delete Chat

Are you sure that you want to delete this chat?

Delete Old Messages

Are you sure that you want to delete the older half of the messages in this chat?

Delete Message

Are you sure that you want to delete this message?

Edit Message

Chat with another person

We have sent an invite to

People in the chat

Add Someone to Chat



Mute Chat

<% end