# HG changeset patch # User Kim Alvefur # Date 1636052616 -3600 # Node ID b7df2c61a144b2a0d17fbc5bbb8b9e28c1b68eef # Parent 3f2342eacb265f5c53eaa49968c0af49f04eb2af mod_rest: Add support for mapping of XEP-0313 query iqs diff -r 3f2342eacb26 -r b7df2c61a144 mod_rest/jsonmap.lib.lua --- a/mod_rest/jsonmap.lib.lua Thu Nov 04 19:46:38 2021 +0100 +++ b/mod_rest/jsonmap.lib.lua Thu Nov 04 20:03:36 2021 +0100 @@ -19,6 +19,8 @@ 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.properties.iq.properties.archive.properties.form = schema._common.dataform; + schema.properties.iq.properties.archive.properties.page = schema._common.rsm; schema._common = nil; end end diff -r 3f2342eacb26 -r b7df2c61a144 mod_rest/res/schema-xmpp.json --- a/mod_rest/res/schema-xmpp.json Thu Nov 04 19:46:38 2021 +0100 +++ b/mod_rest/res/schema-xmpp.json Thu Nov 04 20:03:36 2021 +0100 @@ -200,6 +200,27 @@ "properties" : { "iq" : { "properties" : { + "archive" : { + "properties" : { + "form" : { + "$ref" : "#_common/dataform" + }, + "page" : { + "$ref" : "#_common/rsm" + }, + "queryid" : { + "type" : "string", + "xml" : { + "attribute" : true + } + } + }, + "type" : "object", + "xml" : { + "name" : "query", + "namespace" : "urn:xmpp:mam:2" + } + }, "extdisco" : { "properties" : { "services" : {