Changeset

11823:36a7a3137d41

core.moduleapi: Ensure module:send_iq() handler priority over mod_iq To prevent a situation where you for whatever reason use a full JID that is currently online and the response ends up routed there instead of the module:send_iq() handlers.
author Kim Alvefur <zash@zash.se>
date Fri, 24 Sep 2021 20:26:21 +0200
parents 11822:bdabb0425d77
children 11826:e1c4cc5d0ef8
files core/moduleapi.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/core/moduleapi.lua	Fri Sep 24 20:17:31 2021 +0200
+++ b/core/moduleapi.lua	Fri Sep 24 20:26:21 2021 +0200
@@ -421,8 +421,8 @@
 			return;
 		end
 
-		self:hook(result_event, result_handler);
-		self:hook(error_event, error_handler);
+		self:hook(result_event, result_handler, 1);
+		self:hook(error_event, error_handler, 1);
 
 		local timeout_handle = self:add_timer(timeout or 120, function ()
 			reject(errors.new({