--- 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)