Activity.Queries: Use correct actor restriction.

This commit is contained in:
lain 2020-05-26 17:46:16 +02:00 committed by rinpatch
parent e9aa6a3fa4
commit c29ad60c20

View file

@ -24,10 +24,7 @@ defmodule Pleroma.Activity.Queries do
@spec by_actor(query, String.t()) :: query
def by_actor(query \\ Activity, actor) do
from(
activity in query,
where: fragment("(?)->>'actor' = ?", activity.data, ^actor)
)
from(a in query, where: a.actor == ^actor)
end
@spec by_author(query, User.t()) :: query