Software /
code /
prosody-modules
Changeset
2277:bad5dd466427
mod_spam_reporting: Fire an event to ease processing from other modules
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 20 Aug 2016 17:15:50 +0200 |
parents | 2276:1b12ccbbd9b2 |
children | 2278:983abc684851 |
files | mod_spam_reporting/mod_spam_reporting.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_spam_reporting/mod_spam_reporting.lua Sat Aug 20 17:15:14 2016 +0200 +++ b/mod_spam_reporting/mod_spam_reporting.lua Sat Aug 20 17:15:50 2016 +0200 @@ -16,6 +16,9 @@ "unknown"; local reason = report:get_child_text("reason") or "no reason given"; module:log("warn", "Received report of %s from JID '%s', %s", type, jid, reason); + module:fire_event(module.name.."/"..type.."-report", { + origin = event.origin, stanza = event.stanza, + item = item, report = report, reason = reason, }); end end end, 1);