aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/stanza.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/util/stanza.lua b/util/stanza.lua
index f41ba699..b4deda39 100644
--- a/util/stanza.lua
+++ b/util/stanza.lua
@@ -68,6 +68,15 @@ function stanza_mt:children()
end, self, i;
end
+function stanza_mt:childtags()
+ local i = 0;
+ return function (a)
+ i = i + 1
+ local v = self.tags[i]
+ if v then return v; end
+ end, self.tags[1], i;
+
+end
function stanza_mt.__tostring(t)
local children_text = "";