diff options
author | lain <lain@soykaf.club> | 2020-06-16 13:08:27 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-06-16 13:08:27 +0200 |
commit | 1eb6cedaadee4e1ab3e0885b4e03a8dd17ba08ea (patch) | |
tree | a1d2906242bab43e64f627070f3847a86358734c /lib | |
parent | 1e49bfa9acb4176a161181edcaf04e886c638c42 (diff) | |
download | pleroma-1eb6cedaadee4e1ab3e0885b4e03a8dd17ba08ea.tar.gz |
ActivityPub: When restricting to media posts, only show 'Creates'.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/activity_pub/activity_pub.ex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index c9dc6135c..efb8b81db 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -833,7 +833,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do defp restrict_media(query, %{only_media: true}) do from( - [_activity, object] in query, + [activity, object] in query, + where: fragment("(?)->>'type' = ?", activity.data, "Create"), where: fragment("not (?)->'attachment' = (?)", object.data, ^[]) ) end |