header('Content-Type: application/atom+xml; charset=utf-8');
try {
- $atom->addAuthorRaw($this->group->asAtomAuthor());
- $atom->setActivitySubject($this->group->asActivitySubject());
- $atom->setId($self);
- $atom->setSelfLink($self);
$atom->addEntryFromNotices($this->notices);
$this->raw($atom->getString());
} catch (Atom10FeedException $e) {
}
/**
- * Add a activity feed subject via raw XML string
+ * Deprecated <activity:subject>; ignored
*
* @param string $xmlSubject An XML string representation of the subject
*
* @return void
*/
+
function setActivitySubject($xmlSubject)
{
- $this->subject = $xmlSubject;
+ throw new ServerException(_('Don\'t use this method!'));
}
function getNamespaces()
$this->setId($self);
$this->setSelfLink($self);
- $this->addAuthorRaw($group->asAtomAuthor());
- $this->setActivitySubject($group->asActivitySubject());
+ $ao = ActivityObject::fromGroup($group);
+
+ $this->addAuthorRaw($ao->asString('author'));
$this->addLink($group->homeUrl());
}
$this->user = $user;
if (!empty($user)) {
$profile = $user->getProfile();
- $this->addAuthor($profile->nickname, $user->uri);
- $this->setActivitySubject($profile->asActivityNoun('subject'));
+ $ao = ActivityObject::fromProfile($profile);
+ $this->addAuthorRaw($ao->asString('author'));
}
// TRANS: Title in atom user notice feed. %s is a user name.
$user = $feed->getUser();
$id = $user->id;
$profile = $user->getProfile();
- $feed->setActivitySubject($profile->asActivityNoun('subject'));
} else if ($feed instanceof AtomGroupNoticeFeed) {
$salmonAction = 'groupsalmon';
$group = $feed->getGroup();
$id = $group->id;
- $feed->setActivitySubject($group->asActivitySubject());
} else {
return true;
}