Return an empty set intead of an error when no disco items are available for a host
[prosody.git] / core / discomanager.lua
index 21080635fcebc48e076e447da5b0c5399094a0eb..fe63f972cc0453eec3193a1970d41737a31f83ce 100644 (file)
@@ -41,6 +41,11 @@ do
                        return true;\r
                end\r
        end);\r
+       helper:addDiscoItemsHandler("*host", function(reply, to, from, node)
+               if hosts[to] and hosts[to].type == "local" then
+                       return true;
+               end
+       end);
 end\r
 \r
 module "discomanager"\r