Comparison

core/discomanager.lua @ 648:3f34b83771eb

Return an empty set intead of an error when no disco items are available for a host
author Waqas Hussain <waqas20@gmail.com>
date Fri, 26 Dec 2008 21:46:05 +0500
parent 615:4ae3e81513f3
child 758:b1885732e979
comparison
equal deleted inserted replaced
647:02f4ec1115cd 648:3f34b83771eb
39 if hosts[host] and rostermanager_is_contact_subscribed(node, host, jid_bare(from)) then 39 if hosts[host] and rostermanager_is_contact_subscribed(node, host, jid_bare(from)) then
40 reply:tag("identity", {category="account", type="registered"}):up(); 40 reply:tag("identity", {category="account", type="registered"}):up();
41 return true; 41 return true;
42 end 42 end
43 end); 43 end);
44 helper:addDiscoItemsHandler("*host", function(reply, to, from, node)
45 if hosts[to] and hosts[to].type == "local" then
46 return true;
47 end
48 end);
44 end 49 end
45 50
46 module "discomanager" 51 module "discomanager"
47 52
48 function handle(stanza) 53 function handle(stanza)