changeset 9:b8b12fd8be22

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 30 Oct 2024 10:18:13 -0600
parents d654e3471132
children f9e6a4cc4f7d
files src/chat.html.luan src/lib/User.luan
diffstat 2 files changed, 1 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
diff -r d654e3471132 -r b8b12fd8be22 src/chat.html.luan
--- a/src/chat.html.luan	Wed Oct 30 00:08:59 2024 -0600
+++ b/src/chat.html.luan	Wed Oct 30 10:18:13 2024 -0600
@@ -74,7 +74,7 @@
 			selected = get_chat(with)
 		end
 	end
-	local chats = user.get_chats()
+	local chats = Chat.search( "chat_user_ids:"..user.id, "chat_updated desc" )
 	Io.stdout = Http.response.text_writer()
 %>
 <!doctype html>
diff -r d654e3471132 -r b8b12fd8be22 src/lib/User.luan
--- a/src/lib/User.luan	Wed Oct 30 00:08:59 2024 -0600
+++ b/src/lib/User.luan	Wed Oct 30 10:18:13 2024 -0600
@@ -68,13 +68,6 @@
 		Http.request.cookies.password = user.password or error()
 	end
 
-	function user.get_chats()
-		return Chat.search("chat_user_ids:"..user.id)
-	end
-
-	function user.get_or_create_chat_with(emails)
-	end
-
 	return user
 end