]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Api/Twitter/Statuses/Mentions.php
Reenable Twitter/Statuses tests
[friendica.git] / src / Module / Api / Twitter / Statuses / Mentions.php
index f041c4587eef09854096d3f13fe8b2f906c38b18..47a860c7b945760d64d01e0749124fb909420e3f 100644 (file)
@@ -34,7 +34,7 @@ use Friendica\Model\Post;
  */
 class Mentions extends BaseApi
 {
-       public function rawContent()
+       protected function rawContent(array $request = [])
        {
                BaseApi::checkAllowedScope(BaseApi::SCOPE_READ);
                $uid = BaseApi::getCurrentUserID();
@@ -42,10 +42,10 @@ class Mentions extends BaseApi
                // get last network messages
 
                // params
-               $since_id = intval($_REQUEST['since_id'] ?? 0);
-               $max_id   = intval($_REQUEST['max_id']   ?? 0);
-               $count    = intval($_REQUEST['count']    ?? 20);
-               $page     = intval($_REQUEST['page']     ?? 1);
+               $since_id = $_REQUEST['since_id'] ?? 0;
+               $max_id   = $_REQUEST['max_id']   ?? 0;
+               $count    = $_REQUEST['count']    ?? 20;
+               $page     = $_REQUEST['page']     ?? 1;
 
                $start = max(0, ($page - 1) * $count);
 
@@ -69,7 +69,7 @@ class Mentions extends BaseApi
 
                array_unshift($condition, $query);
 
-               $params = ['order' => ['id' => true], 'limit' => [$start, $count]];
+               $params   = ['order' => ['id' => true], 'limit' => [$start, $count]];
                $statuses = Post::selectForUser($uid, [], $condition, $params);
 
                $include_entities = strtolower(($_REQUEST['include_entities'] ?? 'false') == 'true');
@@ -80,6 +80,6 @@ class Mentions extends BaseApi
                }
                DBA::close($statuses);
 
-               DI::apiResponse()->exit('statuses', ['status' => $ret], $this->parameters['extension'] ?? null, Contact::getPublicIdByUserId($uid));
+               $this->response->exit('statuses', ['status' => $ret], $this->parameters['extension'] ?? null, Contact::getPublicIdByUserId($uid));
        }
 }