aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_component.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_component.lua')
-rw-r--r--plugins/mod_component.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
index 4a210495..b41204a2 100644
--- a/plugins/mod_component.lua
+++ b/plugins/mod_component.lua
@@ -9,7 +9,8 @@
module:set_global();
local t_concat = table.concat;
-local xpcall, tostring, type = xpcall, tostring, type;
+local tostring, type = tostring, type;
+local xpcall = require "util.xpcall".xpcall;
local traceback = debug.traceback;
local logger = require "util.logger";
@@ -38,7 +39,7 @@ end
function module.add_host(module)
if module:get_host_type() ~= "component" then
- error("Don't load mod_component manually, it should be for a component, please see http://prosody.im/doc/components", 0);
+ error("Don't load mod_component manually, it should be for a component, please see https://prosody.im/doc/components", 0);
end
local env = module.environment;
@@ -238,7 +239,7 @@ function stream_callbacks.handlestanza(session, stanza)
end
if stanza then
- return xpcall(function () return core_process_stanza(session, stanza) end, handleerr);
+ return xpcall(core_process_stanza, handleerr, session, stanza);
end
end