add activity:subject to atom feeds

This commit is contained in:
Evan Prodromou 2010-02-21 13:11:00 -05:00
parent d5ba9e1b10
commit 5aeed9e041

View File

@ -102,13 +102,18 @@ class OStatusPlugin extends Plugin
$id = null;
if ($feed instanceof AtomUserNoticeFeed) {
$salmonAction = 'salmon';
$id = $feed->getUser()->id;
$salmonAction = 'usersalmon';
$user = $feed->getUser();
$id = $user->id;
$profile = $user->getProfile();
$feed->setActivitySubject($profile->asActivityNoun('subject'));
} else if ($feed instanceof AtomGroupNoticeFeed) {
$salmonAction = 'salmongroup';
$id = $feed->getGroup()->id;
$salmonAction = 'groupsalmon';
$group = $feed->getGroup();
$id = $group->id;
$feed->setActivitySubject($group->asActivitySubject());
} else {
return;
return true;
}
if (!empty($id)) {
@ -123,6 +128,8 @@ class OStatusPlugin extends Plugin
$salmon = common_local_url($salmonAction, array('id' => $id));
$feed->addLink($salmon, array('rel' => 'salmon'));
}
return true;
}
/**