mirror of
https://github.com/friendica/friendica
synced 2024-12-23 05:20:15 +00:00
[AP] Use contact.alias if it exists instead of contact.url for mention links
- Make mentions links handled by Mastodon for logged in users
This commit is contained in:
parent
edd439cfab
commit
7debe1e999
1 changed files with 2 additions and 2 deletions
|
@ -1253,12 +1253,12 @@ class Transmitter
|
|||
return '';
|
||||
}
|
||||
|
||||
$data = Contact::getByURL($match[1], false, ['url', 'nick']);
|
||||
$data = Contact::getByURL($match[1], false, ['url', 'alias', 'nick']);
|
||||
if (empty($data['nick'])) {
|
||||
return $match[0];
|
||||
}
|
||||
|
||||
return '[url=' . $data['url'] . ']@' . $data['nick'] . '[/url]';
|
||||
return '[url=' . ($data['alias'] ?: $data['url']) . ']@' . $data['nick'] . '[/url]';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue