Stop depending on the embedded object in restrict_favorited_by

This commit is contained in:
rinpatch 2019-08-07 00:12:42 +03:00 committed by Ariadne Conill
parent a7b947534c
commit b85840b536

View File

@ -733,8 +733,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
defp restrict_favorited_by(query, %{"favorited_by" => ap_id}) do defp restrict_favorited_by(query, %{"favorited_by" => ap_id}) do
from( from(
activity in query, [_activity, object] in query,
where: fragment(~s(? <@ (? #> '{"object","likes"}'\)), ^ap_id, activity.data) where: fragment("(?)->'likes' \\? (?)", object.data, ^ap_id)
) )
end end