comparison mod_rest/jsonmap.lib.lua @ 4732:607cac9b9393

mod_rest: Add recursive properties of XEP-0297 forwarded container Let's pray nobody invents a way to loop stanza references as well.
author Kim Alvefur <zash@zash.se>
date Wed, 27 Oct 2021 20:45:28 +0200
parents d71beacaec3b
children 755dd83e9214
comparison
equal deleted inserted replaced
4731:d71beacaec3b 4732:607cac9b9393
14 for key, prop in pairs(schema._common) do 14 for key, prop in pairs(schema._common) do
15 for _, copyto in pairs(schema.properties) do 15 for _, copyto in pairs(schema.properties) do
16 copyto.properties[key] = prop; 16 copyto.properties[key] = prop;
17 end 17 end
18 end 18 end
19 schema.properties.message.properties.forwarded.properties.delay = schema._common.delay;
20 schema.properties.message.properties.forwarded.properties.message.properties = schema.properties.message.properties;
19 schema._common = nil; 21 schema._common = nil;
20 end 22 end
21 end 23 end
22 24
23 -- Some mappings that are still hard to do in a nice way with util.datamapper 25 -- Some mappings that are still hard to do in a nice way with util.datamapper