# HG changeset patch # User Waqas Hussain # Date 1256068906 -18000 # Node ID dab1693f8a08c642e3b7eb9ed9e77a68d85a28ad # Parent 46a9c7c9947669bbb44abe4b2258ba6c462817dc mod_lastactivity: Allow users to request their own last activity. diff -r 46a9c7c99476 -r dab1693f8a08 plugins/mod_lastactivity.lua --- a/plugins/mod_lastactivity.lua Tue Oct 20 18:12:46 2009 +0100 +++ b/plugins/mod_lastactivity.lua Wed Oct 21 01:01:46 2009 +0500 @@ -29,7 +29,7 @@ local origin, stanza = event.origin, event.stanza; if stanza.attr.type == "get" then local username = jid_split(stanza.attr.to) or origin.username; - if is_contact_subscribed(username, module.host, jid_bare(stanza.attr.from)) then + if not stanza.attr.to or is_contact_subscribed(username, module.host, jid_bare(stanza.attr.from)) then local seconds, text = "0", ""; if map[username] then seconds = tostring(os.difftime(os.time(), map[username].t));