From: Michael Date: Sat, 9 May 2020 06:51:13 +0000 (+0000) Subject: Removed unneeded functionality X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bebc6615fc796e8faab2ebaaa39e0d0a0590f92b;p=friendica.git Removed unneeded functionality --- diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index 197fb2baa3..92678e59c9 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -359,9 +359,7 @@ class Processor return false; } - $potential_implicit_mentions = self::getImplicitMentionList($parent); - $content = self::removeImplicitMentionsFromBody($content, $potential_implicit_mentions); - $activity['tags'] = self::convertImplicitMentionsInTags($activity['tags'], $potential_implicit_mentions); + $content = self::removeImplicitMentionsFromBody($content, self::getImplicitMentionList($parent)); } $item['content-warning'] = HTML::toBBCode($activity['summary']); $item['body'] = $content; @@ -1033,24 +1031,4 @@ class Processor return implode('', $kept_mentions); } - - private static function convertImplicitMentionsInTags($activity_tags, array $potential_mentions) - { - if (DI::config()->get('system', 'disable_implicit_mentions')) { - return $activity_tags; - } - - foreach ($activity_tags as $index => $tag) { - if (in_array($tag['href'], $potential_mentions)) { - $activity_tags[$index]['name'] = preg_replace( - '/' . preg_quote(Tag::TAG_CHARACTER[Tag::MENTION], '/') . '/', - Tag::TAG_CHARACTER[Tag::IMPLICIT_MENTION], - $activity_tags[$index]['name'], - 1 - ); - } - } - - return $activity_tags; - } }