]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apitimelinementions.php
correctly get profile for scope in apitimelinementions
[quix0rs-gnu-social.git] / actions / apitimelinementions.php
index 6afb11f860586a3c0c8e94cf79ac2200ae4587b2..2b5053a84f5df0822bafec5454e819abf6d2ccb6 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->getProfile();
+        }
+
+        $stream = new ReplyNoticeStream($this->user->id, $profile);
 
         $notice = $stream->getNotices(($this->page - 1) * $this->count,
                                       $this->count,