diff --git a/lib/Db/NotesRequest.php b/lib/Db/NotesRequest.php index ccfbb58d..b3ce7d74 100644 --- a/lib/Db/NotesRequest.php +++ b/lib/Db/NotesRequest.php @@ -329,7 +329,7 @@ class NotesRequest extends NotesRequestBuilder { $on->add($this->exprLimitToRecipient($qb, $actor->getId(), true)); $qb->join($this->defaultSelectAlias, CoreRequestBuilder::TABLE_SERVER_FOLLOWS, 'f', $on); - $qb->andWhere($this->exprValueWithinJsonFormat($qb, 'hashtags', '#' . $hashtag)); + $qb->andWhere($this->exprValueWithinJsonFormat($qb, 'hashtags', '' . $hashtag)); $this->limitPaginate($qb, $since, $limit); $this->leftJoinCacheActors($qb, 'attributed_to'); diff --git a/lib/Service/NoteService.php b/lib/Service/NoteService.php index 78508dec..a4d432a3 100644 --- a/lib/Service/NoteService.php +++ b/lib/Service/NoteService.php @@ -258,6 +258,7 @@ class NoteService { * @param array $hashtags */ public function addHashtags(Note $note, array $hashtags) { + $note->setHashtags($hashtags); foreach ($hashtags as $hashtag) { $this->addHashtag($note, $hashtag); }