aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pep.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2011-10-13 00:13:49 +0500
committerWaqas Hussain <waqas20@gmail.com>2011-10-13 00:13:49 +0500
commit4b79571a6f529629ccf42ef10bf3f3bd097049b0 (patch)
tree1edc0ea9d403b1f98f7a776686f1102c2cc3d6a8 /plugins/mod_pep.lua
parent11c4ae1a2ba378bd411cafe41d16fe8d8d9c3c9b (diff)
downloadprosody-4b79571a6f529629ccf42ef10bf3f3bd097049b0.tar.gz
prosody-4b79571a6f529629ccf42ef10bf3f3bd097049b0.zip
mod_pep: Always include a 'from' attribute on service discovery requests to local clients (compatibility fix for OneTeam).
Diffstat (limited to 'plugins/mod_pep.lua')
-rw-r--r--plugins/mod_pep.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua
index bd6f4b29..bbdd5f19 100644
--- a/plugins/mod_pep.lua
+++ b/plugins/mod_pep.lua
@@ -136,8 +136,9 @@ module:hook("presence/bare", function(event)
recipients[user][recipient] = hash;
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
+ -- COMPAT from ~= stanza.attr.to because OneTeam can't deal with missing from attribute
origin.send(
- st.stanza("iq", {from=stanza.attr.to, to=stanza.attr.from, id="disco", type="get"})
+ st.stanza("iq", {from=user, to=stanza.attr.from, id="disco", type="get"})
:query("http://jabber.org/protocol/disco#info")
);
end