ostatus:attention links in Notice Atom output
This commit is contained in:
parent
8e6b52e899
commit
3beddffc39
@ -994,7 +994,7 @@ class Notice extends Memcached_DataObject
|
||||
$xs->element('summary', null, $this->content);
|
||||
|
||||
$xs->raw($profile->asAtomAuthor());
|
||||
$xs->raw($profile->asActivityActor($namespace));
|
||||
$xs->raw($profile->asActivityActor());
|
||||
|
||||
$xs->element('link', array('rel' => 'alternate',
|
||||
'href' => $this->bestUrl()));
|
||||
@ -1028,6 +1028,20 @@ class Notice extends Memcached_DataObject
|
||||
);
|
||||
}
|
||||
|
||||
$reply_ids = $this->getReplies();
|
||||
|
||||
foreach ($reply_ids as $id) {
|
||||
$profile = Profile::staticGet('id', $id);
|
||||
if (!empty($profile)) {
|
||||
$xs->element(
|
||||
'link', array(
|
||||
'rel' => 'osatus:attention',
|
||||
'href' => $profile->getAcctUri()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($this->repeat_of)) {
|
||||
$repeat = Notice::staticGet('id', $this->repeat_of);
|
||||
if (!empty($repeat)) {
|
||||
|
@ -803,4 +803,10 @@ class Profile extends Memcached_DataObject
|
||||
|
||||
return $xs->getString();
|
||||
}
|
||||
|
||||
function getAcctUri()
|
||||
{
|
||||
return $this->nickname . '@' . common_config('site', 'server');
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user