File

mod_audit_tokens/mod_audit_tokens.lua @ 6155:d80e398a2acc

mod_anti_spam: Also consider not a stranger if we have a pending (out) sub request
author Matthew Wild <mwild1@gmail.com>
date Fri, 17 Jan 2025 11:02:02 +0000
parent 5773:c89077b4f46e
line wrap: on
line source

local jid = require"util.jid";

module:depends("audit");
-- luacheck: read globals module.audit

module:hook("token-grant-created", function(event)
	module:audit(jid.join(event.username, event.host), "token-grant-created", {
	});
end)

module:hook("token-grant-revoked", function(event)
	module:audit(jid.join(event.username, event.host), "token-grant-revoked", {
	});
end)

module:hook("token-revoked", function(event)
	module:audit(jid.join(event.username, event.host), "token-revoked", {
	});
end)