File

util/xpcall.lua @ 13169:7b6e7290265b

usermanager: Add create_user_with_role() method to atomically set initial role
author Matthew Wild <mwild1@gmail.com>
date Thu, 29 Jun 2023 15:31:46 +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;
};