$sitename = common_config('site', 'name');
$avatar = $this->group->homepage_logo;
$title = sprintf(_("%s timeline"), $this->group->nickname);
- $taguribase = TagURI::base();
- $id = "tag:$taguribase:GroupTimeline:" . $this->group->id;
$subtitle = sprintf(
_('Updates from %1$s on %2$s!'),
try {
- // If this was called using an integer ID, i.e.: using the canonical
- // URL for this group's feed, then pass the Group object into the feed,
- // so the OStatus plugin, and possibly other plugins, can access it.
- // Feels sorta hacky. -- Z
+ $atom = new AtomGroupNoticeFeed($this->group);
- $atom = null;
- $id = $this->arg('id');
-
- if (strval(intval($id)) === strval($id)) {
- $atom = new AtomGroupNoticeFeed($this->group);
- } else {
- $atom = new AtomGroupNoticeFeed();
- }
+ // @todo set all this Atom junk up inside the feed class
$atom->setId($id);
$atom->setTitle($title);
$aargs['id'] = $id;
}
+ $atom->setId($this->getSelfUri('ApiTimelineGroup', $aargs));
+
$atom->addLink(
$this->getSelfUri('ApiTimelineGroup', $aargs),
array('rel' => 'self', 'type' => 'application/atom+xml')
$sitename = common_config('site', 'name');
$title = sprintf(_("%s timeline"), $this->user->nickname);
- $taguribase = TagURI::base();
- $id = "tag:$taguribase:UserTimeline:" . $this->user->id;
$link = common_local_url(
'showstream',
array('nickname' => $this->user->nickname)
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);
$aargs['id'] = $id;
}
+ $atom->setId($this->getSelfUri('ApiTimelineUser', $aargs));
+
$atom->addLink(
$this->getSelfUri('ApiTimelineUser', $aargs),
array('rel' => 'self', 'type' => 'application/atom+xml')