core.moduleapi: Fix error context in :send_iq API
authorKim Alvefur <zash@zash.se>
Mon, 30 Dec 2019 09:53:10 +0100
changeset 10579 5cf8e96575b3
parent 10578 f70c874b7936
child 10580 f88f1151bc72
core.moduleapi: Fix error context in :send_iq API It got passed as argument to reject() instead of the util.error function and was lost.
core/moduleapi.lua
--- a/core/moduleapi.lua	Sun Dec 29 22:20:51 2019 +0100
+++ b/core/moduleapi.lua	Mon Dec 30 09:53:10 2019 +0100
@@ -398,7 +398,7 @@
 
 		local function error_handler(event)
 			if event.stanza.attr.from == stanza.attr.to then
-				reject(errutil.from_stanza(event.stanza), event);
+				reject(errutil.from_stanza(event.stanza, event));
 				return true;
 			end
 		end