diff src/lib/Chat.luan @ 46:42b741a1d5c6

add username
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 28 Feb 2025 19:25:12 -0700
parents e2b7f6393dab
children 9298b04607ae
line wrap: on
line diff
--- a/src/lib/Chat.luan	Fri Feb 28 14:37:11 2025 -0700
+++ b/src/lib/Chat.luan	Fri Feb 28 19:25:12 2025 -0700
@@ -52,6 +52,15 @@
 		Http.push(url,message)
 	end
 
+	function chat.other_user_id(my_id)
+		for _, user_id in ipairs(chat.user_ids) do
+			if user_id ~= my_id then
+				return user_id
+			end
+		end
+		error()
+	end
+
 	return chat
 end