From beac6ef1ea1d9fa358fdc60527952cec1a8f26c7 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 8 Jun 2018 17:04:47 +0200 Subject: util.stanza: Verify that child tags added are really stanzas (closes #1165) --- util/stanza.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/stanza.lua') 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); -- cgit v1.2.3