Software /
code /
prosody
Comparison
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 (2010-12-21) |
parent | 3916:ffe5a0d36f57 |
child | 3919:e288372dd19f |
comparison
equal
deleted
inserted
replaced
3917:263a133bdf5a | 3918:f30c5bad29b8 |
---|---|
191 | 191 |
192 local function add_disco_features_from_service(disco, service) | 192 local function add_disco_features_from_service(disco, service) |
193 for method, features in pairs(feature_map) do | 193 for method, features in pairs(feature_map) do |
194 if service[method] then | 194 if service[method] then |
195 for _, feature in ipairs(features) do | 195 for _, feature in ipairs(features) do |
196 disco:tag("feature", { var = xmlns_pubsub.."#"..feature }):up(); | 196 if feature then |
197 disco:tag("feature", { var = xmlns_pubsub.."#"..feature }):up(); | |
198 end | |
197 end | 199 end |
198 end | 200 end |
199 end | 201 end |
200 for affiliation in pairs(service.config.capabilities) do | 202 for affiliation in pairs(service.config.capabilities) do |
201 if affiliation ~= "none" and affiliation ~= "owner" then | 203 if affiliation ~= "none" and affiliation ~= "owner" then |