From 650af0a27102e5e9067850c88e5b8a446b44f045 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 30 May 2011 15:09:42 -0400 Subject: [PATCH] get the correct context for apitimelinementions --- actions/apitimelinementions.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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, -- 2.39.2