Changeset

3918:f30c5bad29b8

mod_pubsub: Skip false features in feature_map
author Matthew Wild <mwild1@gmail.com>
date Tue, 21 Dec 2010 04:18:58 +0000
parents 3917:263a133bdf5a
children 3919:e288372dd19f
files plugins/mod_pubsub.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_pubsub.lua	Tue Dec 21 04:17:24 2010 +0000
+++ b/plugins/mod_pubsub.lua	Tue Dec 21 04:18:58 2010 +0000
@@ -193,7 +193,9 @@
 	for method, features in pairs(feature_map) do
 		if service[method] then
 			for _, feature in ipairs(features) do
-				disco:tag("feature", { var = xmlns_pubsub.."#"..feature }):up();
+				if feature then
+					disco:tag("feature", { var = xmlns_pubsub.."#"..feature }):up();
+				end
 			end
 		end
 	end