Software /
code /
prosody
Diff
plugins/mod_component.lua @ 8234:97b3ca502547
Merge 0.9->0.10
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 14 Sep 2017 02:47:40 +0200 |
parent | 8134:b87e281a7d59 |
parent | 8233:4e7269c53659 |
child | 8235:7d9a2c200736 |
child | 8508:47115b0ca133 |
line wrap: on
line diff
--- a/plugins/mod_component.lua Tue Sep 12 14:59:52 2017 +0200 +++ b/plugins/mod_component.lua Thu Sep 14 02:47:40 2017 +0200 @@ -170,16 +170,14 @@ session:close("not-well-formed"); elseif error == "stream-error" then local condition, text = "undefined-condition"; - for child in data:children() do - if child.attr.xmlns == xmlns_xmpp_streams then - if child.name ~= "text" then - condition = child.name; - else - text = child:get_text(); - end - if condition ~= "undefined-condition" and text then - break; - end + for child in data:childtags(nil, xmlns_xmpp_streams) do + if child.name ~= "text" then + condition = child.name; + else + text = child:get_text(); + end + if condition ~= "undefined-condition" and text then + break; end end text = condition .. (text and (" ("..text..")") or "");