# HG changeset patch # User Kim Alvefur # Date 1581169103 -3600 # Node ID 59765d1bb6dc0fb9df8721918e33a6ee97d4a8a9 # Parent 04ea96a0488d656ace18f751a56375d2a156a8f8 mod_rest: Support mapping XEP-0004 Data Forms directly diff -r 04ea96a0488d -r 59765d1bb6dc mod_rest/jsonmap.lib.lua --- a/mod_rest/jsonmap.lib.lua Fri Feb 07 22:30:38 2020 +0100 +++ b/mod_rest/jsonmap.lib.lua Sat Feb 08 14:38:23 2020 +0100 @@ -336,6 +336,18 @@ end }; + -- XEP-0004: Data Forms + dataform = dataform; + + -- Simpler mapping from JSON map + formdata = {"func", "jabber:x:data", "", + function () + -- Tricky to do in a generic way without each form layout + -- In the future, some well-known layouts might be understood + return nil, "not-implemented"; + end, + formdata, + }; }; local implied_kinds = {