]> git.mxchange.org Git - friendica.git/commitdiff
Removed unneeded functionality
authorMichael <heluecht@pirati.ca>
Sat, 9 May 2020 06:51:13 +0000 (06:51 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 9 May 2020 06:51:13 +0000 (06:51 +0000)
src/Protocol/ActivityPub/Processor.php

index 197fb2baa3e2791c46fd1ad75a661662ab94d52b..92678e59c99d12973ef6fa963e6ad3a90dbec579 100644 (file)
@@ -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;
-       }
 }