summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-03-02 02:54:52 -0500
committerEvan Prodromou <evan@status.net>2010-03-02 02:54:52 -0500
commitc25fc8a4b51466f13c41efc0565bf15f78f6cb4d (patch)
tree7ce3fb297b502f5efeeb28a4df2834bc4bedfd24 /classes/Notice.php
parent2c677e0f2d881f0c9f5713fcbc37ad24ef0dab26 (diff)
Show <activity:subject> and no activity actors for user feed
We only need one author for user feeds: the user themselves. So, show the user as the activity:subject, and don't repeat the same activity:actor for every notice unnecessarily.
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 3702dbcfa..4b5dbb416 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -1090,7 +1090,7 @@ class Notice extends Memcached_DataObject
return $groups;
}
- function asAtomEntry($namespace=false, $source=false)
+ function asAtomEntry($namespace=false, $source=false, $author=true)
{
$profile = $this->getProfile();
@@ -1136,8 +1136,10 @@ class Notice extends Memcached_DataObject
$xs->element('title', null, $this->content);
$xs->element('summary', null, $this->content);
- $xs->raw($profile->asAtomAuthor());
- $xs->raw($profile->asActivityActor());
+ if ($author) {
+ $xs->raw($profile->asAtomAuthor());
+ $xs->raw($profile->asActivityActor());
+ }
$xs->element('link', array('rel' => 'alternate',
'type' => 'text/html',