$this->target->getNickname(), $this->tag)));
}
+ if (!$this->target->isLocal()) {
+ // remote profiles at least have Atom, but we can't guarantee anything else
+ return array(
+ new Feed(Feed::ATOM,
+ $this->target->getAtomFeed(),
+ // TRANS: Title for link to notice feed.
+ // TRANS: %s is a user nickname.
+ sprintf(_('Notice feed for %s (Atom)'),
+ $this->target->getNickname()))
+ );
+ }
+
return array(new Feed(Feed::JSON,
common_local_url('ApiTimelineUser',
array(
sprintf(_('Notice feed for %s (RSS 2.0)'),
$this->target->getNickname())),
new Feed(Feed::ATOM,
- common_local_url('ApiTimelineUser',
- array(
- 'id' => $this->target->getID(),
- 'format' => 'atom')),
+ $this->target->getAtomFeed(),
// TRANS: Title for link to notice feed.
// TRANS: %s is a user nickname.
sprintf(_('Notice feed for %s (Atom)'),
return !empty($block);
}
- function getAtomFeed()
+ public function getAtomFeed()
{
$feed = null;
if (Event::handle('StartProfileGetAtomFeed', array($this, &$feed))) {
- $user = User::getKV('id', $this->id);
- if (!empty($user)) {
- $feed = common_local_url('ApiTimelineUser', array('id' => $user->id,
+ if ($this->isLocal()) {
+ $feed = common_local_url('ApiTimelineUser', array('id' => $this->getID(),
'format' => 'atom'));
}
Event::handle('EndProfileGetAtomFeed', array($this, $feed));