mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
Merge branch 'fav-speedup' into 'develop'
Fix favorites query performance See merge request pleroma/pleroma!2591
This commit is contained in:
commit
cf139b06a3
1 changed files with 1 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue