From c59ba946483adf5c618337e07f929cd5ff8637e7 Mon Sep 17 00:00:00 2001 From: rabuzarus Date: Sun, 17 Feb 2019 17:19:57 +0100 Subject: [PATCH] fix magic links for item mentions --- src/Model/Term.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Model/Term.php b/src/Model/Term.php index 6a213d445b..6e3425524a 100644 --- a/src/Model/Term.php +++ b/src/Model/Term.php @@ -272,10 +272,10 @@ class Term $author = ['uid' => 0, 'id' => $item['author-id'], 'network' => $item['author-network'], 'url' => $item['author-link']]; - $tag['url'] = Contact::magicLinkByContact($author, $tag['url']); $prefix = ''; if ($tag['type'] == TERM_HASHTAG) { + $tag['url'] = Contact::magicLinkByContact($author, $tag['url']); if ($orig_tag != $tag['url']) { $item['body'] = str_replace($orig_tag, $tag['url'], $item['body']); } @@ -283,6 +283,7 @@ class Term $return['hashtags'][] = '#' . $tag['term'] . ''; $prefix = '#'; } elseif ($tag['type'] == TERM_MENTION) { + $tag['url'] = Contact::magicLink($tag['url']); $return['mentions'][] = '@' . $tag['term'] . ''; $prefix = '@'; }