X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Freplies.php;h=d6d2cb4ba936938c38f65e8fcd48eaa3f424cf3d;hb=c00491cd7a29a9ef16d6e6bfa54505d4c9a522fe;hp=cf248a7785c49e0c89ece25321bca148443026d3;hpb=8b47400183052873b012dacf4eb5ba841914a886;p=quix0rs-gnu-social.git diff --git a/actions/replies.php b/actions/replies.php index cf248a7785..d6d2cb4ba9 100644 --- a/actions/replies.php +++ b/actions/replies.php @@ -65,12 +65,11 @@ class RepliesAction extends Action $nickname = common_canonical_nickname($this->arg('nickname')); - $this->user = User::staticGet('nickname', $nickname); + $this->user = User::getKV('nickname', $nickname); if (!$this->user) { // TRANS: Client error displayed when trying to reply to a non-exsting user. $this->clientError(_('No such user.')); - return false; } $profile = $this->user->getProfile(); @@ -78,7 +77,6 @@ class RepliesAction extends Action if (!$profile) { // TRANS: Error message displayed when referring to a user without a profile. $this->serverError(_('User has no profile.')); - return false; } $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; @@ -143,7 +141,16 @@ class RepliesAction extends Action */ function getFeeds() { - return array(new Feed(Feed::RSS1, + return array(new Feed(Feed::JSON, + common_local_url('ApiTimelineMentions', + array( + 'id' => $this->user->nickname, + 'format' => 'as')), + // TRANS: Link for feed with replies for a user. + // TRANS: %s is a user nickname. + sprintf(_('Replies feed for %s (Activity Streams JSON)'), + $this->user->nickname)), + new Feed(Feed::RSS1, common_local_url('repliesrss', array('nickname' => $this->user->nickname)), // TRANS: Link for feed with replies for a user.