Massage index until it actually does the stuff we want.
Also makes the index a lot smoler.
This commit is contained in:
parent
89762ad230
commit
f3c8b02d65
2 changed files with 31 additions and 1 deletions
|
|
@ -521,7 +521,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
|||
defp restrict_actor(query, _), do: query
|
||||
|
||||
defp restrict_type(query, %{"type" => type}) when is_binary(type) do
|
||||
restrict_type(query, %{"type" => [type]})
|
||||
from(activity in query, where: fragment("?->>'type' = ?", activity.data, ^type))
|
||||
end
|
||||
|
||||
defp restrict_type(query, %{"type" => type}) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue