projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd60fd4
)
Stop depending on the embedded object in restrict_favorited_by
author
rinpatch
<rinpatch@sdf.org>
Tue, 6 Aug 2019 21:12:42 +0000
(
00:12
+0300)
committer
rinpatch
<rinpatch@sdf.org>
Tue, 6 Aug 2019 21:12:42 +0000
(
00:12
+0300)
lib/pleroma/web/activity_pub/activity_pub.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/activity_pub/activity_pub.ex
b/lib/pleroma/web/activity_pub/activity_pub.ex
index 2877c029e0c61f9c6e2889cbebc6543f5e16fe3f..1a279a7df1b7f00e06c6ef3120d8f77585221f2d 100644
(file)
--- 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