X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapitimelinementions.php;h=2b5053a84f5df0822bafec5454e819abf6d2ccb6;hb=d544c78276e6b822e94e7714a98f73b941189185;hp=2857bd41ea3dc3e4933ed8170d4a3a6e3e7b28f0;hpb=59a0b2a82da418f688faf182407146d9e7a7af7a;p=quix0rs-gnu-social.git diff --git a/actions/apitimelinementions.php b/actions/apitimelinementions.php index 2857bd41ea..2b5053a84f 100644 --- a/actions/apitimelinementions.php +++ b/actions/apitimelinementions.php @@ -178,7 +178,7 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction $this->raw($doc->asString()); break; default: - // TRANS: Client error displayed when trying to handle an unknown API method. + // TRANS: Client error displayed when coming across a non-supported API method. $this->clientError(_('API method not found.'), $code = 404); break; } @@ -193,10 +193,18 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction { $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);