From 83ce42172b4851442f48972e82cb2139465d7ddd Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 27 Aug 2017 09:56:41 +0000 Subject: [PATCH] Don't add "redir" links on mentions --- include/text.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/text.php b/include/text.php index fa26b0ef83..9cd861fa55 100644 --- a/include/text.php +++ b/include/text.php @@ -1331,11 +1331,10 @@ function prepare_body(&$item, $attach = false, $preview = false) { $tag["url"] = best_link_url($item, $sp, $tag["url"]); - if ($orig_tag != $tag["url"]) { - $item['body'] = str_replace($orig_tag, $tag["url"], $item['body']); - } - if ($tag["type"] == TERM_HASHTAG) { + if ($orig_tag != $tag["url"]) { + $item['body'] = str_replace($orig_tag, $tag["url"], $item['body']); + } $hashtags[] = "#".$tag["term"].""; $prefix = "#"; } elseif ($tag["type"] == TERM_MENTION) {