view mod_log_events/mod_log_events.lua @ 4869:c3bf568e3977

mod_http_xep227: Initialize XEP-0227 XML mod_storage_xep0227 only writes if there is XML already for a user (it uses the presence of an existing <user> element as an indicator that an account exists, although technically this is not something Prosody itself does, so it's a little weird).
author Matthew Wild <mwild1@gmail.com>
date Sat, 15 Jan 2022 14:25:27 +0000
parents 0e008f36a91c
children
line wrap: on
line source

module:set_global();

local helpers = require "util.helpers";

local function init(module, events, name)
	helpers.log_events(events, name, module._log);

	function module.unload()
		helpers.revert_log_events(events);
	end
end

init(module, prosody.events, "global");

function module.add_host(module)
	init(module, prosody.hosts[module.host].events, module.host);
end