]> git.mxchange.org Git - friendica.git/commitdiff
New configuration to disable the automatic mentions removal
authorMichael <heluecht@pirati.ca>
Wed, 13 Feb 2019 17:23:23 +0000 (17:23 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 13 Feb 2019 17:23:23 +0000 (17:23 +0000)
config/defaults.config.php
src/Protocol/ActivityPub/Processor.php

index c1ecbb42179c3e53dbfe0ab079f0c730ff8e52ee..8a9bc19b5ef02178ac6a6d40a76ccf33d710ccf7 100644 (file)
@@ -135,6 +135,10 @@ return [
                // Disables the check if a mail address is in a valid format and can be resolved via DNS.
                'disable_email_validation' => false,
 
+               // disable_mentions_removal (Boolean)
+               // Disables the automatic removal of mentions in ActivityPub postings.
+               'disable_mentions_removal' => false,
+
                // disable_url_validation (Boolean)
                // Disables the DNS lookup of an URL.
                'disable_url_validation' => false,
index c3b41a1aec98f134eabfea11ca9cca81eaacdd2c..446536278dd07b65cc6ff90bbee7164e844270e5 100644 (file)
@@ -689,6 +689,10 @@ class Processor
         */
        private static function removeImplicitMentionsFromBody($body, array $implicit_mentions)
        {
+               if (Config::get('system', 'disable_mentions_removal')) {
+                       return;
+               }
+
                $kept_mentions = [];
 
                // Extract one prepended mention at a time from the body