projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e154667
)
mod_lastactivity: Allow users to request their own last activity.
author
Waqas Hussain
<waqas20@gmail.com>
Tue, 20 Oct 2009 20:01:46 +0000
(
01:01
+0500)
committer
Waqas Hussain
<waqas20@gmail.com>
Tue, 20 Oct 2009 20:01:46 +0000
(
01:01
+0500)
plugins/mod_lastactivity.lua
patch
|
blob
|
history
diff --git
a/plugins/mod_lastactivity.lua
b/plugins/mod_lastactivity.lua
index 04f817cb0334d73beeb822b9993bedf3c3f7b5b7..acbfb87d829bbf07f96cb0671cfeee9cbca069bb 100644
(file)
--- 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));