]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
get the correct context for apitimelinementions
authorEvan Prodromou <evan@status.net>
Mon, 30 May 2011 19:09:42 +0000 (15:09 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 30 May 2011 19:09:42 +0000 (15:09 -0400)
actions/apitimelinementions.php

index 6afb11f860586a3c0c8e94cf79ac2200ae4587b2..25e08dd0e382a5adc3a8d91e3242f69376643f32 100644 (file)
@@ -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,