# HG changeset patch # User Kim Alvefur # Date 1528470287 -7200 # Node ID c4e430c69f88f94333b134f297c2564a38cf0dbe # Parent cbcac5b9b7ceb0b0061d9b5feae6d8666781b524 util.stanza: Verify that child tags added are really stanzas (closes #1165) diff -r cbcac5b9b7ce -r c4e430c69f88 util/stanza.lua --- 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);