From 427881c437f1d782540ac510fe97a1a2e50d752b Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 1 Oct 2020 21:14:26 +0000 Subject: [PATCH] Default values for settings / use lowercase --- src/Protocol/Relay.php | 3 ++- static/settings.config.php | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Protocol/Relay.php b/src/Protocol/Relay.php index 210509d26f..3184528cc5 100644 --- a/src/Protocol/Relay.php +++ b/src/Protocol/Relay.php @@ -29,7 +29,7 @@ use Friendica\Model\Search; /** * Base class for relay handling */ -final class Relay +class Relay { /** * Check if a post is wanted @@ -84,6 +84,7 @@ final class Relay $content = mb_strtolower(BBCode::toPlaintext($body, false)); foreach ($tags as $tag) { + $tag = mb_strtolower($tag); if (in_array($tag, $denyTags)) { Logger::info('Unwanted hashtag found - rejected', ['hashtag' => $tag, 'network' => $network, 'url' => $url]); return false; diff --git a/static/settings.config.php b/static/settings.config.php index e999b78c43..c05e675edb 100644 --- a/static/settings.config.php +++ b/static/settings.config.php @@ -156,10 +156,18 @@ return [ // Periodically (once an hour) run an "optimize table" command for cache tables 'optimize_tables' => false, + // relay_deny_tags (String) + // Comma separated list of tags that are rejected. + 'relay_deny_tags' => '', + // relay_server (String) // Address of the relay server where public posts should be send to. 'relay_server' => 'https://social-relay.isurf.ca', + // relay_server_tags (String) + // Comma separated list of tags for the "tags" subscription. + 'relay_server_tags' => '', + // relay_user_tags (Boolean) // If enabled, the tags from the saved searches will used for the "tags" subscription in addition to the "relay_server_tags". 'relay_user_tags' => true,