Changeset

3819:1bab6f67eb5f

mod_rest: Fix previous commit Working with the stanza, not the JSON table
author Kim Alvefur <zash@zash.se>
date Wed, 01 Jan 2020 17:45:07 +0100
parents 3818:a607c69d0804
children 3820:d3757e089433
files mod_rest/jsonmap.lib.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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