Changeset

81:e87f4d0b1a80

clix.archive: Show timestamps
author Kim Alvefur <zash@zash.se>
date Thu, 28 Jun 2012 11:33:01 +0200
parents 80:ae77d9c41f4f
children 82:30f85754b1e0
files clix/archive.lua
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/clix/archive.lua	Thu Jun 28 11:32:08 2012 +0200
+++ b/clix/archive.lua	Thu Jun 28 11:33:01 2012 +0200
@@ -13,10 +13,13 @@
 		opts["end"] = parse_datetime(opts["end"]);
 	end
 	local selfjid;
-	local function print_message(m)
+	local function print_message(i)
 		-- TODO Roster lookup
-		-- TODO Timestamp
+		local m = i.message;
 		local a = m.attr;
+		if i.stamp then
+			print(os.date(nil, i.stamp));
+		end
 		if a.to and bare_jid(a.to) ~= selfjid then
 			print("To ".. bare_jid(a.to));
 		end
@@ -35,7 +38,7 @@
 		selfjid = bare_jid(conn.jid);
 		local function handle_results(ok, result)
 			for i=1,#result do
-				print_message(result[i].message);
+				print_message(result[i]);
 			end
 			if result.last then
 				io.stderr:write "--More--"