File

util/xpcall.lua @ 13293:ad1ed84fdf13

mod_bosh: Include stream attributes in stream-features event This matches what mod_c2s does, and fixes a traceback in mod_sasl2_fast when used with BOSH (that module tries to use event.stream.from).
author Matthew Wild <mwild1@gmail.com>
date Sat, 28 Oct 2023 13:15:56 +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;
};