Mercurial > prosody-hg
view plugins/mod_debug_sql.lua @ 10694:0cda5d597607
mod_presence: Advertise support for Subscription Pre-Approval
RFC 6121 ยง3.4 says:
> If a server supports subscription pre-approvals, then it MUST
> advertise the following stream feature during stream negotiation.
The feature itself (#686) was added in f0e9e5bda415
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 19 Mar 2020 00:10:15 +0100 |
| parents | 5edb0d01a94f |
| children |
line wrap: on
line source
-- Enables SQL query logging -- -- luacheck: ignore 213/uri module:set_global(); local engines = module:shared("/*/sql/connections"); for uri, engine in pairs(engines) do engine:debug(true); end setmetatable(engines, { __newindex = function (t, uri, engine) engine:debug(true); rawset(t, uri, engine); end }); function module.unload() setmetatable(engines, nil); for uri, engine in pairs(engines) do engine:debug(false); end end
