clix/receive.lua

changeset 22
19c5a66837ed
parent 17
fa9efbef8a0c
child 27
5b58c002d6ad
--- a/clix/receive.lua	Thu Jan 07 21:22:27 2010 +0000
+++ b/clix/receive.lua	Thu Jan 07 21:24:47 2010 +0000
@@ -1,7 +1,10 @@
+short_opts.h = "history";
+
 return function (opts, args)
 	local function on_message(message)
 		local body = message:get_child("body");
-		if body then
+		local delay = message:get_child("delay", "urn:xmpp:delay");
+		if body and (not delay or opts.history) then
 			print(body:get_text());
 		end
 	end

mercurial