# HG changeset patch # User Kim Alvefur # Date 1577897107 -3600 # Node ID 1bab6f67eb5f73f4b16ed743fee4ba27150aeb91 # Parent a607c69d08049b796b7afb4659971cd1a3cc1d63 mod_rest: Fix previous commit Working with the stanza, not the JSON table diff -r a607c69d0804 -r 1bab6f67eb5f mod_rest/jsonmap.lib.lua --- a/mod_rest/jsonmap.lib.lua Wed Jan 01 17:37:04 2020 +0100 +++ b/mod_rest/jsonmap.lib.lua Wed Jan 01 17:45:07 2020 +0100 @@ -225,8 +225,8 @@ if t.from and not s.attr.from then return nil, "invalid-jid-from"; end - if kind == "iq" and not t.type then - t.type = "get"; + if kind == "iq" and not s.attr.type then + s.attr.type = "get"; end if type(t.error) == "table" then