exit(1);
}
-require_once INSTALLDIR . '/lib/apibareauth.php';
-
/**
* Returns the most recent (default 20) mentions (status containing @nickname)
*
function showTimeline()
{
$profile = $this->user->getProfile();
- $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
$sitename = common_config('site', 'name');
$title = sprintf(
);
$taguribase = TagURI::base();
$id = "tag:$taguribase:Mentions:" . $this->user->id;
- $link = common_local_url(
- 'replies',
- array('nickname' => $this->user->nickname)
- );
+ $logo = $profile->avatarUrl(AVATAR_PROFILE_SIZE);
+ $link = common_local_url('replies',
+ array('nickname' => $this->user->nickname));
$self = $this->getSelfUri();
$subtitle = sprintf(
_('%1$s updates that reply to updates from %2$s / %3$s.'),
$sitename, $this->user->nickname, $profile->getBestName()
);
- $logo = ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_PROFILE_SIZE);
switch($this->format) {
case 'xml':
$this->showJsonTimeline($this->notices);
break;
case 'as':
- header('Content-Type: application/json; charset=utf-8');
+ header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($title);
$doc->addLink($link, 'alternate', 'text/html');
{
$notices = array();
- $notice = $this->user->getReplies(
- ($this->page - 1) * $this->count, $this->count,
- $this->since_id, $this->max_id
- );
+ if (empty($this->auth_user)) {
+ $profile = null;
+ } else {
+ $profile = $this->auth_user->getProfile();
+ }
+
+ $stream = new ReplyNoticeStream($this->user->id, $profile);
+
+ $notice = $stream->getNotices(($this->page - 1) * $this->count,
+ $this->count,
+ $this->since_id,
+ $this->max_id);
while ($notice->fetch()) {
$notices[] = clone($notice);