since we'll then get to /user/$id instead of /$nickname which is
good for future archives if someone changes their nickname...
if ($mentioned instanceof Profile) {
try {
- $url = $mentioned->getUrl();
+ $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()));
}