mirror of
https://github.com/friendica/friendica
synced 2024-11-18 07:03:40 +00:00
Trim the tag
This commit is contained in:
parent
85f57e69fa
commit
934766c364
2 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ class Follow extends BaseApi
|
|||
DI::mstdnError()->UnprocessableEntity();
|
||||
}
|
||||
|
||||
$fields = ['uid' => $uid, 'term' => '#' . $this->parameters['hashtag']];
|
||||
$fields = ['uid' => $uid, 'term' => '#' . ltrim($this->parameters['hashtag'], '#')];
|
||||
if (!DBA::exists('search', $fields)) {
|
||||
DBA::insert('search', $fields);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ 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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue