1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-25 08:15:09 +01:00

Stop depending on the embedded object in restrict_favorited_by

This commit is contained in:
rinpatch 2019-08-07 00:12:42 +03:00
parent fd60fd4713
commit 73d8d5c49f

View File

@ -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