X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapitimelinementions.php;h=9dc2162cc45fa738e8c368c0b8841f19ef3f677a;hb=c8d5c8442fe6ce54f7f65d1d0eb4203b06c09583;hp=fe5ff0f28fd2eabfa0c7d236c4877bbb51d58fc7;hpb=7021dd9341635090207a39ea8f74558e243c874f;p=quix0rs-gnu-social.git diff --git a/actions/apitimelinementions.php b/actions/apitimelinementions.php index fe5ff0f28f..9dc2162cc4 100644 --- a/actions/apitimelinementions.php +++ b/actions/apitimelinementions.php @@ -76,7 +76,7 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction $this->user = $this->getTargetUser($this->arg('id')); if (empty($this->user)) { - $this->clientError(_('No such user!'), 404, $this->format); + $this->clientError(_('No such user.'), 404, $this->format); return; } @@ -110,6 +110,7 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction function showTimeline() { $profile = $this->user->getProfile(); + $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE); $sitename = common_config('site', 'name'); $title = sprintf( @@ -126,27 +127,28 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction _('%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->showXmlTimeline($this->notices); break; case 'rss': - $this->showRssTimeline($this->notices, $title, $link, $subtitle); + $this->showRssTimeline($this->notices, $title, $link, $subtitle, null, $logo); break; case 'atom': $selfuri = common_root_url() . ltrim($_SERVER['QUERY_STRING'], 'p='); $this->showAtomTimeline( $this->notices, $title, $id, $link, $subtitle, - null, $selfuri + null, $selfuri, $logo ); break; case 'json': $this->showJsonTimeline($this->notices); break; default: - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); break; } }