diff --git a/actions/apitimelinegroup.php b/actions/apitimelinegroup.php index a85da4b0f3..e1bc102e45 100644 --- a/actions/apitimelinegroup.php +++ b/actions/apitimelinegroup.php @@ -125,10 +125,6 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction 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) { diff --git a/lib/atom10feed.php b/lib/atom10feed.php index 3ae9dc81be..881df6605f 100644 --- a/lib/atom10feed.php +++ b/lib/atom10feed.php @@ -146,15 +146,16 @@ class Atom10Feed extends XMLStringer } /** - * Add a activity feed subject via raw XML string + * Deprecated ; 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() diff --git a/lib/atomgroupnoticefeed.php b/lib/atomgroupnoticefeed.php index 39a1fd456e..5b6fcf4295 100644 --- a/lib/atomgroupnoticefeed.php +++ b/lib/atomgroupnoticefeed.php @@ -85,8 +85,9 @@ class AtomGroupNoticeFeed extends AtomNoticeFeed $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()); } diff --git a/lib/atomusernoticefeed.php b/lib/atomusernoticefeed.php index ec368f5ca1..5ca089b859 100644 --- a/lib/atomusernoticefeed.php +++ b/lib/atomusernoticefeed.php @@ -60,8 +60,8 @@ class AtomUserNoticeFeed extends AtomNoticeFeed $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. diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index d0b64e8769..86bd15e0b7 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -145,12 +145,10 @@ class OStatusPlugin extends Plugin $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; }