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=c29ad60c2014069929bc2906aa3af106a04ef215;p=akkoma Activity.Queries: Use correct actor restriction. --- diff --git a/lib/pleroma/activity/queries.ex b/lib/pleroma/activity/queries.ex index 04593b9fb..633eca0b3 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