[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
|
@ -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