kopia lustrzana https://github.com/nextcloud/social
Fix setting hashtags when creating a post
Signed-off-by: Julius Härtl <jus@bitgrid.net>pull/295/head
rodzic
5ddf8ee7c2
commit
8c0c0bc5a3
|
@ -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');
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue