From: rinpatch Date: Tue, 6 Aug 2019 21:12:42 +0000 (+0300) Subject: Stop depending on the embedded object in restrict_favorited_by X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=73d8d5c49f66d77ea77540223aaa8f94d91f63f8;p=akkoma Stop depending on the embedded object in restrict_favorited_by --- diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 2877c029e..1a279a7df 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -749,8 +749,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do defp restrict_favorited_by(query, %{"favorited_by" => ap_id}) do from( - activity in query, - where: fragment(~s(? <@ (? #> '{"object","likes"}'\)), ^ap_id, activity.data) + [_activity, object] in query, + where: fragment("(?)->'likes' \\? (?)", object.data, ^ap_id) ) end