18 if stanza.attr.type == "get" then |
18 if stanza.attr.type == "get" then |
19 origin.send(st.reply(stanza):tag("query", {xmlns = "jabber:iq:last", seconds = tostring(os.difftime(os.time(), start_time))})); |
19 origin.send(st.reply(stanza):tag("query", {xmlns = "jabber:iq:last", seconds = tostring(os.difftime(os.time(), start_time))})); |
20 return true; |
20 return true; |
21 end |
21 end |
22 end); |
22 end); |
23 |
|
24 module:hook("iq/bare/jabber:iq:last:query", function(event) |
|
25 local origin, stanza = event.origin, event.stanza; |
|
26 if stanza.attr.type == "get" then |
|
27 -- TODO last activity |
|
28 end |
|
29 end); |
|