aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-12-12 15:42:00 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-12-12 15:42:00 +0500
commita985caeff2f624190575c34d927b966d7af3945b (patch)
tree73e7cc78e1926cafba4f4067e8cce150e51a845d
parentff21209224c5546b68e7f8cd73e78c9c7cbed740 (diff)
downloadprosody-a985caeff2f624190575c34d927b966d7af3945b.tar.gz
prosody-a985caeff2f624190575c34d927b966d7af3945b.zip
mod_pep: Fixed a traceback when non-local users send presence.
-rw-r--r--plugins/mod_pep.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua
index f215b8be..9ff6cac2 100644
--- a/plugins/mod_pep.lua
+++ b/plugins/mod_pep.lua
@@ -134,7 +134,7 @@ module:hook("presence/bare", function(event)
publish_all(user, recipient, origin);
else
recipients[user][recipient] = hash;
- local from_bare = origin.username.."@"..origin.host;
+ local from_bare = origin.type == "c2s" and origin.username.."@"..origin.host;
if self or origin.type ~= "c2s" or (recipients[from_bare] and recipients[from_bare][origin.full_jid]) ~= hash then
origin.send(
st.stanza("iq", {from=stanza.attr.to, to=stanza.attr.from, id="disco", type="get"})