util/xpcall.lua
author Kim Alvefur <zash@zash.se>
Sun, 03 Dec 2023 23:19:27 +0100
changeset 13490 fdd1438d9ef7
parent 12979 d10957394a3c
permissions -rw-r--r--
mod_pep: Implement 'roster' (group) access_model Allows e.g. restricting your vcard4 to only family or similar. Notes: This does not include roster groups in the configuration form, so the client will have to get them from the actual roster.

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;
};