mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-27 00:09:35 +00:00
Activity.Queries: Use correct actor restriction.
This commit is contained in:
parent
e9aa6a3fa4
commit
c29ad60c20
|
@ -24,10 +24,7 @@ defmodule Pleroma.Activity.Queries do
|
||||||
|
|
||||||
@spec by_actor(query, String.t()) :: query
|
@spec by_actor(query, String.t()) :: query
|
||||||
def by_actor(query \\ Activity, actor) do
|
def by_actor(query \\ Activity, actor) do
|
||||||
from(
|
from(a in query, where: a.actor == ^actor)
|
||||||
activity in query,
|
|
||||||
where: fragment("(?)->>'actor' = ?", activity.data, ^actor)
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@spec by_author(query, User.t()) :: query
|
@spec by_author(query, User.t()) :: query
|
||||||
|
|
Loading…
Reference in a new issue