# HG changeset patch # User Kim Alvefur # Date 1340875981 -7200 # Node ID e87f4d0b1a80a0a5452bdf8a6685467ef1222dda # Parent ae77d9c41f4fa75e525ed2ae10d6a06f1a8b3e6d clix.archive: Show timestamps diff -r ae77d9c41f4f -r e87f4d0b1a80 clix/archive.lua --- 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--"