# HG changeset patch # User Kim Alvefur # Date 1471706452 -7200 # Node ID 0899eeb0b3f7bbc25a473573761c2a684939b700 # Parent ebe360f59119df256c89dd55ad5624e969bd1ba3 mod_spam_reporting: Apply JID prepping diff -r ebe360f59119 -r 0899eeb0b3f7 mod_spam_reporting/mod_spam_reporting.lua --- 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