diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-01-11 09:33:01 +0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2019-02-05 15:10:24 -0100 |
commit | 8c0c0bc5a3f20f86002be8cab6030f5cfab8af12 (patch) | |
tree | e2c366176aa3266fcdc89c8abbcd0c8660cd8280 | |
parent | 5ddf8ee7c21d58db4a3d19edeeab7f28459da3be (diff) |
Fix setting hashtags when creating a post
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r-- | lib/Db/NotesRequest.php | 2 | ||||
-rw-r--r-- | lib/Service/NoteService.php | 1 |
2 files changed, 2 insertions, 1 deletions
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); } |