diff --git a/actions/apitimelinementions.php b/actions/apitimelinementions.php index 6afb11f860..25e08dd0e3 100644 --- a/actions/apitimelinementions.php +++ b/actions/apitimelinementions.php @@ -193,8 +193,13 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction { $notices = array(); - $stream = new ReplyNoticeStream($this->user->id, - Profile::current()); + if (empty($this->auth_user)) { + $profile = null; + } else { + $profile = $this->auth_user->profile; + } + + $stream = new ReplyNoticeStream($this->user->id, $profile); $notice = $stream->getNotices(($this->page - 1) * $this->count, $this->count,