forked from GNUsocial/gnu-social
Use the profile URI when linking instead of URL
since we'll then get to /user/$id instead of /$nickname which is good for future archives if someone changes their nickname...
This commit is contained in:
parent
5b11238010
commit
cb40f72c7e
@ -771,7 +771,10 @@ function common_find_mentions($text, Profile $sender, Notice $parent=null)
|
||||
|
||||
if ($mentioned instanceof Profile) {
|
||||
try {
|
||||
$url = $mentioned->getUri(); // prefer the URI as URL, if it is one.
|
||||
if (!common_valid_http_url($url)) {
|
||||
$url = $mentioned->getUrl();
|
||||
}
|
||||
} catch (InvalidUrlException $e) {
|
||||
$url = common_local_url('userbyid', array('id' => $mentioned->getID()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user