equal
deleted
inserted
replaced
1 local jid = require "util.jid"; |
1 local jid = require "util.jid"; |
|
2 local set = require "util.set"; |
2 local st = require "util.stanza"; |
3 local st = require "util.stanza"; |
3 local admins = module:get_option_inherited_set("admins"); |
4 local usermanager = require "core.usermanager"; |
4 local host = module.host; |
5 local host = module.host; |
|
6 |
|
7 local admins; |
|
8 if usermanager.get_jids_with_role then |
|
9 admins = set.new(usermanager.get_jids_with_role("prosody:admin"), host); |
|
10 else -- COMPAT w/pre-0.12 |
|
11 admins = module:get_option_inherited_set("admins"); |
|
12 end |
5 |
13 |
6 module:depends("spam_reporting") |
14 module:depends("spam_reporting") |
7 |
15 |
8 module:hook("spam_reporting/spam-report", function(event) |
16 module:hook("spam_reporting/spam-report", function(event) |
9 local reporter_bare_jid = jid.bare(event.stanza.attr.from) |
17 local reporter_bare_jid = jid.bare(event.stanza.attr.from) |