From ee5999b307558946f85dad56def4bd22b9a0b437 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Wed, 21 Oct 2009 01:01:46 +0500 Subject: mod_lastactivity: Allow users to request their own last activity. --- plugins/mod_lastactivity.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_lastactivity.lua b/plugins/mod_lastactivity.lua index 04f817cb..acbfb87d 100644 --- a/plugins/mod_lastactivity.lua +++ b/plugins/mod_lastactivity.lua @@ -29,7 +29,7 @@ module:hook("iq/bare/jabber:iq:last:query", function(event) 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)); -- cgit v1.2.3