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
commit1836db91623887b736250cc0a8840fba44368bd8 (patch)
tree07f2d1029978cb4d7885b2b3476e7569014247cc /util
parent2220edd813cc4f6558f71aeca55dbf082271bb9f (diff)
downloadprosody-1836db91623887b736250cc0a8840fba44368bd8.tar.gz
prosody-1836db91623887b736250cc0a8840fba44368bd8.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);