diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-10-21 01:01:46 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-10-21 01:01:46 +0500 |
commit | ee5999b307558946f85dad56def4bd22b9a0b437 (patch) | |
tree | 1d9e4cc39d28c885e0902c9b9c423956f9476524 /plugins/mod_lastactivity.lua | |
parent | cdd29e47f765aad2b12bf3255347c42a1b3a5bec (diff) | |
download | prosody-ee5999b307558946f85dad56def4bd22b9a0b437.tar.gz prosody-ee5999b307558946f85dad56def4bd22b9a0b437.zip |
mod_lastactivity: Allow users to request their own last activity.
Diffstat (limited to 'plugins/mod_lastactivity.lua')
-rw-r--r-- | plugins/mod_lastactivity.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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)); |