Software /
code /
prosody-modules
Comparison
mod_delegation/mod_delegation.lua @ 1988:d7c1daaf2dea
mod_delegation: fixed attribute filtering
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 01 Dec 2015 12:43:04 +0100 |
parent | 1776:e7b5ab44339c |
child | 1991:a1d5214bd369 |
comparison
equal
deleted
inserted
replaced
1955:f719d5e6c627 | 1988:d7c1daaf2dea |
---|---|
263 -- we don't forward stanzas from managing entity itself | 263 -- we don't forward stanzas from managing entity itself |
264 return | 264 return |
265 end | 265 end |
266 if ns_data.filtering then | 266 if ns_data.filtering then |
267 local first_child = stanza.tags[1] | 267 local first_child = stanza.tags[1] |
268 for _, attribute in ns_data.filtering do | 268 for _, attribute in pairs(ns_data.filtering) do |
269 -- if any filtered attribute if not present, | 269 -- if any filtered attribute if not present, |
270 -- we must continue the normal bahaviour | 270 -- we must continue the normal bahaviour |
271 if not first_child.attr[attribute] then | 271 if not first_child.attr[attribute] then |
272 -- Filtered attribute is not present, we do normal workflow | 272 -- Filtered attribute is not present, we do normal workflow |
273 return; | 273 return; |