util/xpcall.lua
author Kim Alvefur <zash@zash.se>
Mon, 15 Feb 2021 16:29:13 +0100
branch0.11
changeset 11380 774811e2c6ab
parent 9564 cfc7b2f7251e
child 12979 d10957394a3c
permissions -rw-r--r--
mod_pep: Advertise base pubsub feature (fixes #1632) Noticed while discussing feature discovery in Gajim Thanks lovetox

local xpcall = xpcall;

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

return {
	xpcall = xpcall;
};