Comparison

plugins/mod_pep.lua @ 1457:4723bd466a54

mod_pep: Pass origin/session to publish_all()
author Matthew Wild <mwild1@gmail.com>
date Thu, 02 Jul 2009 04:11:51 +0100
parent 1451:cc0aa9470775
child 1461:51f0202b0868
comparison
equal deleted inserted replaced
1456:3135cf40110d 1457:4723bd466a54
100 if recipients[user] then recipients[user][recipient] = nil; end 100 if recipients[user] then recipients[user][recipient] = nil; end
101 else 101 else
102 recipients[user] = recipients[user] or {}; 102 recipients[user] = recipients[user] or {};
103 if hash_map[hash] then 103 if hash_map[hash] then
104 recipients[user][recipient] = hash_map[hash]; 104 recipients[user][recipient] = hash_map[hash];
105 publish_all(user, recipient); 105 publish_all(user, recipient, origin);
106 else 106 else
107 recipients[user][recipient] = hash; 107 recipients[user][recipient] = hash;
108 origin.send( 108 origin.send(
109 st.stanza("iq", {from=stanza.attr.to, to=stanza.attr.from, id="disco", type="get"}) 109 st.stanza("iq", {from=stanza.attr.to, to=stanza.attr.from, id="disco", type="get"})
110 :query("http://jabber.org/protocol/disco#info") 110 :query("http://jabber.org/protocol/disco#info")