clix/send.lua

changeset 21
cdeb02d9546d
parent 18
6ad3ea055905
child 27
5b58c002d6ad
--- a/clix/send.lua	Thu Jan 07 20:59:15 2010 +0000
+++ b/clix/send.lua	Thu Jan 07 21:22:27 2010 +0000
@@ -7,7 +7,9 @@
 	end
 	local function on_connect(conn)
 		local function send_message(text)
-			conn:send(verse.message({ to = opts.to, type = opts.type or "chat" }):body(text));
+			conn:send(verse.message({ to = opts.to,
+				type = opts.type or (opts.chatroom and "groupchat") or "chat" })
+				:body(text));
 		end
 		if opts.interactive or opts.stdin then
 			-- Fake socket object around stdin

mercurial