New configuration to disable the automatic mentions removal

pull/6651/head
Michael 2019-02-13 17:23:23 +00:00
rodzic a29b6f17e2
commit d4baa25349
2 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -135,6 +135,10 @@ return [
// Disables the check if a mail address is in a valid format and can be resolved via DNS. // Disables the check if a mail address is in a valid format and can be resolved via DNS.
'disable_email_validation' => false, '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) // disable_url_validation (Boolean)
// Disables the DNS lookup of an URL. // Disables the DNS lookup of an URL.
'disable_url_validation' => false, 'disable_url_validation' => false,

Wyświetl plik

@ -689,6 +689,10 @@ class Processor
*/ */
private static function removeImplicitMentionsFromBody($body, array $implicit_mentions) private static function removeImplicitMentionsFromBody($body, array $implicit_mentions)
{ {
if (Config::get('system', 'disable_mentions_removal')) {
return;
}
$kept_mentions = []; $kept_mentions = [];
// Extract one prepended mention at a time from the body // Extract one prepended mention at a time from the body