Mercurial > prosody-modules
changeset 2281:0899eeb0b3f7
mod_spam_reporting: Apply JID prepping
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 20 Aug 2016 17:20:52 +0200 (2016-08-20) |
parents | ebe360f59119 |
children | 122f0e53dc5a |
files | mod_spam_reporting/mod_spam_reporting.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_spam_reporting/mod_spam_reporting.lua Sat Aug 20 17:20:08 2016 +0200 +++ b/mod_spam_reporting/mod_spam_reporting.lua Sat Aug 20 17:20:52 2016 +0200 @@ -3,6 +3,8 @@ -- -- This file is MIT/X11 licensed. +local jid_prep = require "util.jid".prep; + module:depends("blocklist"); module:add_feature("urn:xmpp:reporting:0"); @@ -12,7 +14,7 @@ module:hook("iq-set/self/urn:xmpp:blocking:block", function (event) for item in event.stanza.tags[1]:childtags("item") do local report = item:get_child("report", "urn:xmpp:reporting:0"); - local jid = item.attr.jid; + local jid = jid_prep(item.attr.jid); if report and jid then local type = report:get_child("spam") and "spam" or report:get_child("abuse") and "abuse" or