mod_disco: Don't add caps hash to stream features on unauthenticated connections.
authorWaqas Hussain <waqas20@gmail.com>
Thu, 2 Dec 2010 19:37:54 +0000 (00:37 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Thu, 2 Dec 2010 19:37:54 +0000 (00:37 +0500)
plugins/mod_disco.lua

index 9bef62957ed955e8443b45ddb5dcbd4c3e6f9eb9..907ca7531c6561af5e4128035a77a9f42edfd041 100644 (file)
@@ -115,7 +115,9 @@ end);
 
 -- Handle caps stream feature
 module:hook("stream-features", function (event)
-       event.features:add_child(get_server_caps_feature());
+       if event.origin.type == "c2s" then
+               event.features:add_child(get_server_caps_feature());
+       end
 end);
 
 -- Handle disco requests to user accounts