summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-02-11 15:24:18 -0800
committerZach Copley <zach@status.net>2010-02-11 16:29:27 -0800
commit3beddffc39e9a0bc5d32f50f4c8f93771060a032 (patch)
treee6d73b2b25a2ac6fb7037495ea085355d372fe29 /classes
parent8e6b52e8994ce9a3180554f999bdc89b414fc892 (diff)
ostatus:attention links in Notice Atom output
Diffstat (limited to 'classes')
-rw-r--r--classes/Notice.php16
-rw-r--r--classes/Profile.php6
2 files changed, 21 insertions, 1 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 091f2dc7b..a39388cdb 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -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)) {
diff --git a/classes/Profile.php b/classes/Profile.php
index 664c45f64..3e5150c18 100644
--- a/classes/Profile.php
+++ b/classes/Profile.php
@@ -803,4 +803,10 @@ class Profile extends Memcached_DataObject
return $xs->getString();
}
+
+ function getAcctUri()
+ {
+ return $this->nickname . '@' . common_config('site', 'server');
+ }
+
}