- // If true, return only local statuses. Defaults to false.
- $local = (bool)!isset($_REQUEST['local']) ? false : ($_REQUEST['local'] == 'true');
- // If true, return only statuses with media attachments. Defaults to false.
- $only_media = (bool)!isset($_REQUEST['only_media']) ? false : ($_REQUEST['only_media'] == 'true'); // Currently not supported
- // Return results older than this ID.
- $max_id = (int)!isset($_REQUEST['max_id']) ? 0 : $_REQUEST['max_id'];
- // Return results newer than this ID.
- $since_id = (int)!isset($_REQUEST['since_id']) ? 0 : $_REQUEST['since_id'];
- // Return results immediately newer than this ID.
- $min_id = (int)!isset($_REQUEST['min_id']) ? 0 : $_REQUEST['min_id'];
- // Maximum number of results to return. Defaults to 20.
- $limit = (int)!isset($_REQUEST['limit']) ? 20 : $_REQUEST['limit'];
-
- $params = ['order' => ['uri-id' => true], 'limit' => $limit];
+ /**
+ * @todo Respect missing parameters
+ * @see https://github.com/tootsuite/mastodon/blob/main/app/controllers/api/v1/timelines/tag_controller.rb
+ *
+ * There seem to be the parameters "any", "all", and "none".
+ */
+
+ $request = $this->getRequest([
+ 'local' => false, // If true, return only local statuses. Defaults to false.
+ 'remote' => false, // Show only remote statuses? Defaults to false.
+ 'only_media' => false, // If true, return only statuses with media attachments. Defaults to false.
+ 'max_id' => 0, // Return results older than this ID.
+ 'since_id' => 0, // Return results newer than this ID.
+ 'min_id' => 0, // Return results immediately newer than this ID.
+ 'limit' => 20, // Maximum number of results to return. Defaults to 20.
+ 'with_muted' => false, // Pleroma extension: return activities by muted (not by blocked!) users.
+ 'exclude_replies' => false, // Don't show comments
+ ], $request);
+
+ $params = ['order' => ['uri-id' => true], 'limit' => $request['limit']];