Software /
code /
prosody
Changeset
12725:12ced5db29b2
Merge 0.12->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 15 Sep 2022 11:11:52 +0200 |
parents | 12723:4cfd09343947 (current diff) 12724:5b5b428d67e2 (diff) |
children | 12726:9f100ab9ffdf |
files | util/stanza.lua |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/util/stanza.lua Wed Sep 07 12:27:12 2022 +0200 +++ b/util/stanza.lua Thu Sep 15 11:11:52 2022 +0200 @@ -167,6 +167,7 @@ return child; end end + return nil; end function stanza_mt:get_child_text(name, xmlns) @@ -189,12 +190,14 @@ for _, child in ipairs(self.tags) do if child.name == name then return child; end end + return nil; end function stanza_mt:child_with_ns(ns) for _, child in ipairs(self.tags) do if child.attr.xmlns == ns then return child; end end + return nil; end function stanza_mt:get_child_with_attr(name, xmlns, attr_name, attr_value, normalize) @@ -203,6 +206,7 @@ return tag; end end + return nil; end function stanza_mt:children() @@ -369,6 +373,7 @@ if #t.tags == 0 then return t_concat(t); end + return nil; end function stanza_mt.get_error(stanza)