Changeset

8889:c4e430c69f88

util.stanza: Verify that child tags added are really stanzas (closes #1165)
author Kim Alvefur <zash@zash.se>
date Fri, 08 Jun 2018 17:04:47 +0200
parents 8888:cbcac5b9b7ce
children 8890:3490bc478804
files util/stanza.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/stanza.lua	Fri Jun 08 16:15:32 2018 +0200
+++ b/util/stanza.lua	Fri Jun 08 17:04:47 2018 +0200
@@ -135,7 +135,7 @@
 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);