Software /
code /
prosody-modules
Changeset
4372:78de3c7acf58
mod_rest: Fix json-mapping stanzas with text or whitespace between tags
Test:
jsonmap.st2json( st.message({}, "hi"):indent() )
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 22 Jan 2021 15:19:53 +0100 |
parents | 4371:3d01bc4547b2 |
children | 4373:41ac0941b217 |
files | mod_rest/jsonmap.lib.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_rest/jsonmap.lib.lua Thu Jan 21 18:54:42 2021 +0000 +++ b/mod_rest/jsonmap.lib.lua Fri Jan 22 15:19:53 2021 +0100 @@ -486,7 +486,7 @@ return t; end - for tag in s:children() do + for _, tag in ipairs(s.tags) do local prefix = "{" .. (tag.attr.xmlns or "jabber:client") .. "}"; local mapping = byxmlname[prefix .. tag.name]; if not mapping then