# HG changeset patch # User Kim Alvefur # Date 1635360328 -7200 # Node ID 607cac9b9393c8f51e37b988c50898bac7a7da26 # Parent d71beacaec3bcb59bd80bd55d986897feba689fc mod_rest: Add recursive properties of XEP-0297 forwarded container Let's pray nobody invents a way to loop stanza references as well. diff -r d71beacaec3b -r 607cac9b9393 mod_rest/jsonmap.lib.lua --- a/mod_rest/jsonmap.lib.lua Wed Oct 27 20:43:17 2021 +0200 +++ b/mod_rest/jsonmap.lib.lua Wed Oct 27 20:45:28 2021 +0200 @@ -16,6 +16,8 @@ copyto.properties[key] = prop; end end + schema.properties.message.properties.forwarded.properties.delay = schema._common.delay; + schema.properties.message.properties.forwarded.properties.message.properties = schema.properties.message.properties; schema._common = nil; end end diff -r d71beacaec3b -r 607cac9b9393 mod_rest/res/schema-xmpp.json --- a/mod_rest/res/schema-xmpp.json Wed Oct 27 20:43:17 2021 +0200 +++ b/mod_rest/res/schema-xmpp.json Wed Oct 27 20:45:28 2021 +0200 @@ -402,6 +402,17 @@ } }, "forwarded" : { + "properties" : { + "delay" : { + "$ref" : "#_common/delay" + }, + "message" : { + "type" : "object", + "xml" : { + "namespace" : "jabber:client" + } + } + }, "title" : "XEP-0297: Stanza Forwarding", "type" : "object", "xml" : {