]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Api/Mastodon/Tags/Unfollow.php
Merge branch 'develop' into show_image_upload_limit
[friendica.git] / src / Module / Api / Mastodon / Tags / Unfollow.php
index 465c1974b59452cf7a7a00aa89f630fad7a69d33..f3fbad2e5ab0e3e4cd3003c22679447e7da1f6a9 100644 (file)
@@ -40,11 +40,11 @@ class Unfollow extends BaseApi
                        DI::mstdnError()->UnprocessableEntity();
                }
 
-               $term = ['uid' => $uid, 'term' => '#' . $this->parameters['hashtag']];
+               $term = ['uid' => $uid, 'term' => '#' . ltrim($this->parameters['hashtag'], '#')];
 
                DBA::delete('search', $term);
 
-               $hashtag  = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, $term, [], false);
+               $hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, $term, [], false);
                System::jsonExit($hashtag->toArray());
        }
 }