From 3beddffc39e9a0bc5d32f50f4c8f93771060a032 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Thu, 11 Feb 2010 15:24:18 -0800 Subject: ostatus:attention links in Notice Atom output --- classes/Notice.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'classes/Notice.php') 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)) { -- cgit v1.2.3-54-g00ecf