commit: b6a9d87f16a4806eab7a6da874d6f75b65d4f214
parent e3ea311cd594d4f0bc8c4e05ca8eb1eee18ae6be
Author: marcin mikołajczak <git@mkljczk.pl>
Date: Wed, 15 Mar 2023 19:44:42 +0100
Display reposted replies with exclude_replies: true
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
Diffstat:
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/changelog.d/show-reposter-replies.add b/changelog.d/show-reposter-replies.add
@@ -0,0 +1 @@
+Display reposted replies with exclude_replies: true
+\ No newline at end of file
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex
@@ -964,8 +964,9 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
defp restrict_replies(query, %{exclude_replies: true}) do
from(
- [_activity, object] in query,
- where: fragment("?->>'inReplyTo' is null", object.data)
+ [activity, object] in query,
+ where:
+ fragment("?->>'inReplyTo' is null or ?->>'type' = 'Announce'", object.data, activity.data)
)
end