Wed, 21 Oct 2009 01:01:46 +0500
mod_lastactivity: Allow users to request their own last activity.
plugins/mod_lastactivity.lua | file | annotate | diff | comparison | revisions |
--- 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));