diff mod_rest/jsonmap.lib.lua @ 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 a607c69d0804
children f0a1d113dce4
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