Commit 218a2fe9 authored by Marcelo Rivera's avatar Marcelo Rivera

(feat): support filtering by hashtags

1 merge request!292WIP: (feat): Minds Pro (development branch) - Release 2
Pipeline #75398774 passed with stages
in 10 minutes and 36 seconds
......@@ -141,6 +141,20 @@ class channel implements Interfaces\Api
$opts['nsfw'] = explode(',', $nsfw);
}
$hashtag = null;
if (isset($_GET['hashtag'])) {
$hashtag = strtolower($_GET['hashtag']);
}
if ($hashtag) {
$opts['hashtags'] = [$hashtag];
$opts['filter_hashtags'] = true;
} elseif (isset($_GET['hashtags']) && $_GET['hashtags']) {
$opts['hashtags'] = explode(',', $_GET['hashtags']);
$opts['filter_hashtags'] = true;
}
try {
$result = $this->getData($entities, $opts, $asActivities, $sync);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment