Software /
code /
prosody
Diff
util/stanza.lua @ 12725:12ced5db29b2
Merge 0.12->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 15 Sep 2022 11:11:52 +0200 |
parent | 12687:5b69ecaf3427 |
parent | 12724:5b5b428d67e2 |
child | 12802:4a8740e01813 |
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)