ensure we only find creates in ES search
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
This commit is contained in:
parent
61641957cb
commit
a215f01cce
1 changed files with 5 additions and 2 deletions
|
@ -62,8 +62,11 @@ def search(user, query, options) do
|
|||
Task.async(fn ->
|
||||
q = es_query(:activity, parsed_query, offset, limit)
|
||||
|
||||
Pleroma.Search.Elasticsearch.Store.search(:activities, q)
|
||||
|> Enum.filter(fn x -> Visibility.visible_for_user?(x, user) end)
|
||||
:activities
|
||||
|> Pleroma.Search.Elasticsearch.Store.search(q)
|
||||
|> Enum.filter(fn x ->
|
||||
x.data["type"] == "Create" && x.object.data["type"] == "Note" && Visibility.visible_for_user?(x, user)
|
||||
end)
|
||||
end)
|
||||
|
||||
activity_results = Task.await(activity_task)
|
||||
|
|
Loading…
Reference in a new issue