diff options
author | Kim Alvefur <zash@zash.se> | 2014-02-26 22:22:43 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2014-02-26 22:22:43 +0100 |
commit | b438e60d17b5103114ff9e187d171960d88259c9 (patch) | |
tree | 1c5e65e70f484393b24c0bcd9ecd9f6c30d55922 /tools/ejabberd2prosody.lua | |
parent | 383feaeddeb540024d5b06f97d402cef3061b7d5 (diff) | |
parent | 4996a4724e87130c36f8d90b6cdf3628d39cebd8 (diff) | |
download | prosody-b438e60d17b5103114ff9e187d171960d88259c9.tar.gz prosody-b438e60d17b5103114ff9e187d171960d88259c9.zip |
Merge 0.10->trunk
Diffstat (limited to 'tools/ejabberd2prosody.lua')
-rwxr-xr-x | tools/ejabberd2prosody.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/ejabberd2prosody.lua b/tools/ejabberd2prosody.lua index e9dbd2dc..66bf4f93 100755 --- a/tools/ejabberd2prosody.lua +++ b/tools/ejabberd2prosody.lua @@ -44,8 +44,10 @@ function build_stanza(tuple, stanza) for _, a in ipairs(tuple[4]) do build_stanza(a, stanza); end if up then stanza:up(); else return stanza end elseif tuple[1] == "xmlcdata" then - assert(type(tuple[2]) == "string", "XML CDATA has unexpected type: "..type(tuple[2])); - stanza:text(tuple[2]); + if type(tuple[2]) ~= "table" then + assert(type(tuple[2]) == "string", "XML CDATA has unexpected type: "..type(tuple[2])); + stanza:text(tuple[2]); + end -- else it's [], i.e., the null value, used for the empty string else error("unknown element type: "..serialize(tuple)); end |