From: Evan Prodromou Date: Mon, 30 May 2011 19:09:42 +0000 (-0400) Subject: get the correct context for apitimelinementions X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=650af0a27102e5e9067850c88e5b8a446b44f045;p=quix0rs-gnu-social.git get the correct context for apitimelinementions --- 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,