$xs->element(
'id',
null,
- common_local_url(
- 'userbyid',
- array('id' => $this->id)
- )
+ $this->getUri()
);
$xs->element('title', null, $this->getBestName());
$xs->element(
'link', array(
'type' => empty($avatar) ? 'image/png' : $avatar->mediatype,
+ 'rel' => 'avatar',
'href' => empty($avatar)
? Avatar::defaultImage(AVATAR_PROFILE_SIZE)
: $avatar->displayUrl()
return $xs->getString();
}
- function getAcctUri()
+ function getUri()
{
- return $this->nickname . '@' . common_config('site', 'server');
+ if (Event::handle('GetProfileUri', array($this))) {
+
+ $remote = Remote_profile::staticGet('id', $this->id);
+
+ if (!empty($remote)) {
+ return $remote->uri;
+ } else {
+ return common_local_url(
+ 'userbyid',
+ array('id' => $this->id)
+ );
+ }
+ }
}
}