# HG changeset patch # User Kim Alvefur # Date 1577953698 -3600 # Node ID f0a1d113dce45f77af6ee34753e1ef67bdcfd459 # Parent 11272a3233ce2c99de302fbbeb80d9ce0b4e7e29 mod_rest: Add support for mapping 'node' attr in disco#info diff -r 11272a3233ce -r f0a1d113dce4 mod_rest/jsonmap.lib.lua --- a/mod_rest/jsonmap.lib.lua Wed Jan 01 18:41:04 2020 +0100 +++ b/mod_rest/jsonmap.lib.lua Thu Jan 02 09:28:18 2020 +0100 @@ -52,11 +52,12 @@ features:push(tag.attr.var); end end - return { identities = identities, features = features, }; + return { node = s.attr.node, identities = identities, features = features, }; end; function (s) local disco = st.stanza("query", { xmlns = "http://jabber.org/protocol/disco#info" }); if type(s) == "table" then + disco.attr.node = tostring(s.node); if s.identities then for identity in ipairs(s.identities) do disco:tag("identity", { category = identity[1], type = identity[2] }):up();