Diff

plugins/mod_pubsub.lua @ 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
parent 3916:ffe5a0d36f57
child 3919:e288372dd19f
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