Software /
code /
prosody-modules
Changeset
1310:2df312eb816d
mod_seclabels: Avoid tracebacks about indexing nil stanza
author | Vadim Misbakh-Soloviov <mva@mva.name> |
---|---|
date | Wed, 19 Feb 2014 17:59:17 +0700 |
parents | 1309:d3579ea5ff33 |
children | 1311:27b2a357c73c |
files | mod_seclabels/mod_seclabels.lua |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_seclabels/mod_seclabels.lua Wed Feb 19 17:57:32 2014 +0700 +++ b/mod_seclabels/mod_seclabels.lua Wed Feb 19 17:59:17 2014 +0700 @@ -11,8 +11,10 @@ module:hook("account-disco-info", function(event) -- COMPAT local stanza = event.stanza; - stanza:tag('feature', {var=xmlns_label}):up(); - stanza:tag('feature', {var=xmlns_label_catalog}):up(); + if stanza then + stanza:tag('feature', {var=xmlns_label}):up(); + stanza:tag('feature', {var=xmlns_label_catalog}):up(); + end; end); local default_labels = {