Removed unneeded functionality

This commit is contained in:
Michael 2020-05-09 06:51:13 +00:00
parent d5f64e1156
commit bebc6615fc

View 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;
}
}