]> 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 ecd2a1a0e69594511bdc6c10eb6db57ec9344df2..2b5053a84f5df0822bafec5454e819abf6d2ccb6 100644 (file)
@@ -193,10 +193,18 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction
     {
         $notices = array();
 
-        $notice = $this->user->getReplies(
-            ($this->page - 1) * $this->count, $this->count,
-            $this->since_id, $this->max_id
-        );
+        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,
+                                      $this->since_id,
+                                      $this->max_id);
 
         while ($notice->fetch()) {
             $notices[] = clone($notice);