From bebc6615fc796e8faab2ebaaa39e0d0a0590f92b Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 9 May 2020 06:51:13 +0000 Subject: [PATCH] Removed unneeded functionality --- src/Protocol/ActivityPub/Processor.php | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index 197fb2baa..92678e59c 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; - } }