aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_lastactivity.lua2
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));