aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/stanza.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/stanza.lua b/util/stanza.lua
index 1ad3679b..7e40dfa4 100644
--- a/util/stanza.lua
+++ b/util/stanza.lua
@@ -65,6 +65,14 @@ function stanza_mt:up()
return self;
end
+function stanza_mt:reset()
+ local last_add = self.last_add;
+ for i = 1,#last_add do
+ last_add[i] = nil;
+ end
+ return self;
+end
+
function stanza_mt:add_direct_child(child)
if type(child) == "table" then
t_insert(self.tags, child);