Comparison

core/moduleapi.lua @ 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
parent 11822:bdabb0425d77
child 11921:89aef37fca54
comparison
equal deleted inserted replaced
11822:bdabb0425d77 11823:36a7a3137d41
419 text = "IQ stanza id attribute already used", 419 text = "IQ stanza id attribute already used",
420 })); 420 }));
421 return; 421 return;
422 end 422 end
423 423
424 self:hook(result_event, result_handler); 424 self:hook(result_event, result_handler, 1);
425 self:hook(error_event, error_handler); 425 self:hook(error_event, error_handler, 1);
426 426
427 local timeout_handle = self:add_timer(timeout or 120, function () 427 local timeout_handle = self:add_timer(timeout or 120, function ()
428 reject(errors.new({ 428 reject(errors.new({
429 type = "wait", condition = "remote-server-timeout", 429 type = "wait", condition = "remote-server-timeout",
430 text = "IQ stanza timed out", 430 text = "IQ stanza timed out",