Comparison

plugins/mod_pep.lua @ 3737:659563b1db89

mod_pep: Handle the case where local contacts send directed presence with caps hash.
author Waqas Hussain <waqas20@gmail.com>
date Sun, 12 Dec 2010 06:35:53 +0500
parent 3668:29a340777d7b
child 3738:ae2ac97b23b1
comparison
equal deleted inserted replaced
3736:73399dd525e8 3737:659563b1db89
132 if hash_map[hash] then 132 if hash_map[hash] then
133 recipients[user][recipient] = hash_map[hash]; 133 recipients[user][recipient] = hash_map[hash];
134 publish_all(user, recipient, origin); 134 publish_all(user, recipient, origin);
135 else 135 else
136 recipients[user][recipient] = hash; 136 recipients[user][recipient] = hash;
137 if self or origin.type ~= "c2s" then 137 local from_bare = origin.username.."@"..origin.host;
138 if self or origin.type ~= "c2s" or (recipients[from_bare] and recipients[from_bare][origin.full_jid]) ~= hash then
138 origin.send( 139 origin.send(
139 st.stanza("iq", {from=stanza.attr.to, to=stanza.attr.from, id="disco", type="get"}) 140 st.stanza("iq", {from=stanza.attr.to, to=stanza.attr.from, id="disco", type="get"})
140 :query("http://jabber.org/protocol/disco#info") 141 :query("http://jabber.org/protocol/disco#info")
141 ); 142 );
142 end 143 end