From: lain Date: Tue, 26 May 2020 15:46:16 +0000 (+0200) Subject: Activity.Queries: Use correct actor restriction. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=d8d99fd4cf56b4e3adb17c75062a08ec3fdebb89;p=akkoma Activity.Queries: Use correct actor restriction. --- diff --git a/lib/pleroma/activity/queries.ex b/lib/pleroma/activity/queries.ex index a34c20343..c99aae44b 100644 --- a/lib/pleroma/activity/queries.ex +++ b/lib/pleroma/activity/queries.ex @@ -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