--- a/mod_rest/jsonmap.lib.lua Fri Feb 07 20:49:07 2020 +0100
+++ b/mod_rest/jsonmap.lib.lua Fri Feb 07 20:53:57 2020 +0100
@@ -90,6 +90,14 @@
};
local simple_types = {
+ -- top level stanza attributes
+ -- needed here to mark them as known fields
+ kind = "attr",
+ type = "attr",
+ to = "attr",
+ from = "attr",
+ id = "attr",
+
-- basic message
body = "text_tag",
subject = "text_tag",
@@ -453,6 +461,8 @@
if typ then
if typ == "text_tag" then
s:text_tag(k, v);
+ elseif typ == "attr" then -- luacheck: ignore 542
+ -- handled already
elseif typ[1] == "text_tag" then
s:text_tag(typ[3] or k, v, typ[2] and { xmlns = typ[2] });
elseif typ[1] == "name" then