# HG changeset patch # User Matthew Wild # Date 1629993133 -3600 # Node ID 6e5572fc6840bea0ebb3277c0549de8f69048a5d # Parent a357c3e3bd325da96a9952e00370bbf37b30c613 mod_watch_spam_reports: Support for fetching admins from authz provider diff -r a357c3e3bd32 -r 6e5572fc6840 mod_watch_spam_reports/mod_watch_spam_reports.lua --- a/mod_watch_spam_reports/mod_watch_spam_reports.lua Wed Aug 25 19:42:28 2021 +0200 +++ b/mod_watch_spam_reports/mod_watch_spam_reports.lua Thu Aug 26 16:52:13 2021 +0100 @@ -1,8 +1,16 @@ local jid = require "util.jid"; +local set = require "util.set"; local st = require "util.stanza"; -local admins = module:get_option_inherited_set("admins"); +local usermanager = require "core.usermanager"; local host = module.host; +local admins; +if usermanager.get_jids_with_role then + admins = set.new(usermanager.get_jids_with_role("prosody:admin"), host); +else -- COMPAT w/pre-0.12 + admins = module:get_option_inherited_set("admins"); +end + module:depends("spam_reporting") module:hook("spam_reporting/spam-report", function(event)