clix/archive.lua

changeset 78
bed3cfce7d60
parent 77
22be057cf590
child 79
a19ccb8f1ef9
equal deleted inserted replaced
77:22be057cf590 78:bed3cfce7d60
1 local bare_jid = require"util.jid".bare; 1 local bare_jid = require"util.jid".bare;
2 local parse_datetime = require"util.datetime".parse;
2 return function (opts, arg) 3 return function (opts, arg)
3 if opts.short_help then 4 if opts.short_help then
4 print("Fetch archived messages"); 5 print("Fetch archived messages");
5 return; 6 return;
6 end 7 end
7 8
9 if opts.start then
10 opts.start = parse_datetime(opts.start);
11 end
12 if opts["end"] then
13 opts["end"] = parse_datetime(opts["end"]);
14 end
8 local selfjid; 15 local selfjid;
9 local function print_message(m) 16 local function print_message(m)
10 -- TODO Roster lookup 17 -- TODO Roster lookup
11 -- TODO Timestamp 18 -- TODO Timestamp
12 local a = m.attr; 19 local a = m.attr;

mercurial