21 local t = os.time(); |
21 local t = os.time(); |
22 local s = stanza:child_with_name("status"); |
22 local s = stanza:child_with_name("status"); |
23 s = s and #s.tags == 0 and s[1] or ""; |
23 s = s and #s.tags == 0 and s[1] or ""; |
24 map[event.origin.username] = {s = s, t = t}; |
24 map[event.origin.username] = {s = s, t = t}; |
25 end |
25 end |
26 end); |
26 end, 10); |
27 |
27 |
28 module:hook("iq/bare/jabber:iq:last:query", function(event) |
28 module:hook("iq/bare/jabber:iq:last:query", function(event) |
29 local origin, stanza = event.origin, event.stanza; |
29 local origin, stanza = event.origin, event.stanza; |
30 if stanza.attr.type == "get" then |
30 if stanza.attr.type == "get" then |
31 local username = jid_split(stanza.attr.to) or origin.username; |
31 local username = jid_split(stanza.attr.to) or origin.username; |