mirror of
https://github.com/friendica/friendica
synced 2024-11-18 15:43:42 +00:00
fix magic links for item mentions
This commit is contained in:
parent
9ebb2f42a1
commit
c59ba94648
1 changed files with 2 additions and 1 deletions
|
@ -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'][] = '#<a href="' . $tag['url'] . '" target="_blank">' . $tag['term'] . '</a>';
|
||||
$prefix = '#';
|
||||
} elseif ($tag['type'] == TERM_MENTION) {
|
||||
$tag['url'] = Contact::magicLink($tag['url']);
|
||||
$return['mentions'][] = '@<a href="' . $tag['url'] . '" target="_blank">' . $tag['term'] . '</a>';
|
||||
$prefix = '@';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue