File

util/xpcall.lua @ 13342:d0a9b631a937

util.startup: Use prosody. module namespace Maybe we need some sort of lint for this?
author Kim Alvefur <zash@zash.se>
date Fri, 24 Nov 2023 13:41:21 +0100
parent 12975:d10957394a3c
line wrap: on
line source

local xpcall = xpcall;

if select(2, xpcall(function (x) return x end, function () end,  "test")) ~= "test" then
	xpcall = require"prosody.util.compat".xpcall;
end

return {
	xpcall = xpcall;
};