X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=actions%2Fapitimelineuser.php;h=b3ded97c0fc09152b985e62fa93c3fb3929e2627;hb=517fd54b6515375b075a5d7253a8b66e53785baa;hp=9f7ec4c2363ab7bdac8490f7796c3fd04c377327;hpb=880acb05b0f51f873e72a7b4d322cefafe7e850c;p=quix0rs-gnu-social.git diff --git a/actions/apitimelineuser.php b/actions/apitimelineuser.php index 9f7ec4c236..b3ded97c0f 100644 --- a/actions/apitimelineuser.php +++ b/actions/apitimelineuser.php @@ -116,8 +116,6 @@ class ApiTimelineUserAction extends ApiBareAuthAction $sitename = common_config('site', 'name'); $title = sprintf(_("%s timeline"), $this->user->nickname); - $taguribase = common_config('integration', 'taguri'); - $id = "tag:$taguribase:UserTimeline:" . $this->user->id; $link = common_local_url( 'showstream', array('nickname' => $this->user->nickname) @@ -148,21 +146,10 @@ class ApiTimelineUserAction extends ApiBareAuthAction header('Content-Type: application/atom+xml; charset=utf-8'); - // If this was called using an integer ID, i.e.: using the canonical - // URL for this user's feed, then pass the User object into the feed, - // so the OStatus plugin, and possibly other plugins, can access it. - // Feels sorta hacky. -- Z + // @todo set all this Atom junk up inside the feed class - $atom = null; - $id = $this->arg('id'); - - if (strval(intval($id)) === strval($id)) { - $atom = new AtomUserNoticeFeed($this->user); - } else { - $atom = new AtomUserNoticeFeed(); - } + $atom = new AtomUserNoticeFeed($this->user); - $atom->setId($id); $atom->setTitle($title); $atom->setSubtitle($subtitle); $atom->setLogo($logo); @@ -181,6 +168,8 @@ class ApiTimelineUserAction extends ApiBareAuthAction $aargs['id'] = $id; } + $atom->setId($this->getSelfUri('ApiTimelineUser', $aargs)); + $atom->addLink( $this->getSelfUri('ApiTimelineUser', $aargs), array('rel' => 'self', 'type' => 'application/atom+xml')