# HG changeset patch # User Kim Alvefur # Date 1635360894 -7200 # Node ID 755dd83e9214c1cfbb91bbff30fc6cc86215b174 # Parent 607cac9b9393c8f51e37b988c50898bac7a7da26 mod_rest: Add JSON mapping of XEP-0313 archive result container diff -r 607cac9b9393 -r 755dd83e9214 mod_rest/jsonmap.lib.lua --- a/mod_rest/jsonmap.lib.lua Wed Oct 27 20:45:28 2021 +0200 +++ b/mod_rest/jsonmap.lib.lua Wed Oct 27 20:54:54 2021 +0200 @@ -16,6 +16,7 @@ copyto.properties[key] = prop; end end + schema.properties.message.properties.archive.properties.forward = schema.properties.message.properties.forwarded; 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; diff -r 607cac9b9393 -r 755dd83e9214 mod_rest/res/schema-xmpp.json --- a/mod_rest/res/schema-xmpp.json Wed Oct 27 20:45:28 2021 +0200 +++ b/mod_rest/res/schema-xmpp.json Wed Oct 27 20:54:54 2021 +0200 @@ -370,6 +370,24 @@ }, "message" : { "properties" : { + "archive" : { + "properties" : { + "forward" : { + "$ref" : "#forwarded" + }, + "queryid" : { + "type" : "string", + "xml" : { + "attribute" : true + } + } + }, + "type" : "object", + "xml" : { + "name" : "result", + "namespace" : "urn:xmpp:mam:2" + } + }, "attach_to" : { "title" : "XEP-0367: Message Attaching", "type" : "string",