File

mod_audit_tokens/mod_audit_tokens.lua @ 5944:d073ada49a86

mod_invites_webgen: fix variable name for http path
author Trần H. Trung <xmpp:trần.h.trung@trung.fun>
date Wed, 26 Feb 2025 18:47:07 +0700
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)