51 t_insert(self, child); |
51 t_insert(self, child); |
52 end |
52 end |
53 |
53 |
54 function stanza_mt:add_child(child) |
54 function stanza_mt:add_child(child) |
55 (self.last_add[#self.last_add] or self):add_direct_child(child); |
55 (self.last_add[#self.last_add] or self):add_direct_child(child); |
56 t_insert(self.last_add, s); |
|
57 return self; |
56 return self; |
58 end |
57 end |
59 |
58 |
60 function stanza_mt:child_with_name(name) |
59 function stanza_mt:child_with_name(name) |
61 for _, child in ipairs(self) do |
60 for _, child in ipairs(self) do |