mod_rest: Fix previous commit
authorKim Alvefur <zash@zash.se>
Wed, 01 Jan 2020 17:45:07 +0100
changeset 3823 1bab6f67eb5f
parent 3822 a607c69d0804
child 3824 d3757e089433
mod_rest: Fix previous commit Working with the stanza, not the JSON table
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