aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-06-08 17:04:47 +0200
committerKim Alvefur <zash@zash.se>2018-06-08 17:04:47 +0200
commitbeac6ef1ea1d9fa358fdc60527952cec1a8f26c7 (patch)
tree07f2d1029978cb4d7885b2b3476e7569014247cc /util
parentfd873fa69344b42bdd648ea6115f1856ca738eb1 (diff)
downloadprosody-beac6ef1ea1d9fa358fdc60527952cec1a8f26c7.tar.gz
prosody-beac6ef1ea1d9fa358fdc60527952cec1a8f26c7.zip
util.stanza: Verify that child tags added are really stanzas (closes #1165)
Diffstat (limited to 'util')
-rw-r--r--util/stanza.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/stanza.lua b/util/stanza.lua
index 4f91d5e9..6453be48 100644
--- a/util/stanza.lua
+++ b/util/stanza.lua
@@ -135,7 +135,7 @@ function stanza_mt:reset()
end
function stanza_mt:add_direct_child(child)
- if type(child) == "table" then
+ if is_stanza(child) then
t_insert(self.tags, child);
end
t_insert(self, child);