1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-03 01:39:35 +02:00

Replace options rtbl_host and rtbl_domains_node with rtbl_services

This commit is contained in:
Badlop 2025-06-27 17:56:58 +02:00
parent d862e04186
commit 5e93725044
7 changed files with 76 additions and 22 deletions

View file

@ -31,6 +31,7 @@
disconnect/1, put_event/2, get_event/1, peer_muc_jid/1,
my_muc_jid/1, get_features/2, set_opt/3]).
-include("suite.hrl").
-include("mod_antispam.hrl").
%% @format-begin
@ -166,7 +167,8 @@ rtbl_domains(Config) ->
RTBLDomainsNode = <<"spam_source_domains">>,
OldOpts = gen_mod:get_module_opts(Host, mod_antispam),
NewOpts =
maps:merge(OldOpts, #{rtbl_host => RTBLHost, rtbl_domains_node => RTBLDomainsNode}),
maps:merge(OldOpts,
#{rtbl_services => [#rtbl_service{host = RTBLHost, node = RTBLDomainsNode}]}),
Owner = jid:make(?config(user, Config), ?config(server, Config), <<>>),
{result, _} =
mod_pubsub:create_node(RTBLHost,
@ -210,7 +212,8 @@ rtbl_domains_whitelisted(Config) ->
RTBLDomainsNode = <<"spam_source_domains">>,
OldOpts = gen_mod:get_module_opts(Host, mod_antispam),
NewOpts =
maps:merge(OldOpts, #{rtbl_host => RTBLHost, rtbl_domains_node => RTBLDomainsNode}),
maps:merge(OldOpts,
#{rtbl_services => [#rtbl_service{host = RTBLHost, node = RTBLDomainsNode}]}),
Owner = jid:make(?config(user, Config), ?config(server, Config), <<>>),
{result, _} =
mod_pubsub:create_node(RTBLHost,

View file

@ -7,7 +7,8 @@ define_macro:
db_type: internal
access: local
mod_antispam:
rtbl_host: pubsub.mnesia.localhost
rtbl_services:
- "pubsub.mnesia.localhost"
spam_jids_file: spam_jids.txt
spam_domains_file: spam_domains.txt
spam_urls_file: spam_urls.txt

View file

@ -8,7 +8,8 @@ define_macro:
db_type: internal
access: local
mod_antispam:
rtbl_host: pubsub.redis.localhost
rtbl_services:
- "pubsub.redis.localhost"
spam_jids_file: spam_jids.txt
spam_domains_file: spam_domains.txt
spam_urls_file: spam_urls.txt