summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaniini <ariadne@dereferenced.org>2019-10-07 12:43:21 +0000
committerkaniini <ariadne@dereferenced.org>2019-10-07 12:43:21 +0000
commit380c67e2c3ebbc1676814abb806f52cf7075f8bd (patch)
tree31dcbacd376ab0e86217ad690f834d63525505e8
parent0a99f1e8c5551dcf170722e5087a0401b2d907af (diff)
parent9a2f71f4d507301c52f1cc8f2e27fefc0b4385e9 (diff)
downloadpleroma-380c67e2c3ebbc1676814abb806f52cf7075f8bd.tar.gz
pleroma-380c67e2c3ebbc1676814abb806f52cf7075f8bd.zip
Merge branch 'bugfix/exclude-replies' into 'develop'
mastodon api: fix exclude_replies (closes #1287) Closes #1287 See merge request pleroma/pleroma!1813
-rw-r--r--CHANGELOG.md1
-rw-r--r--lib/pleroma/web/activity_pub/activity_pub.ex4
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f193ec1ff..8b24db7f4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -85,6 +85,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- ActivityPub: Fix `/users/:nickname/inbox` crashing without an authenticated user
- MRF: fix ability to follow a relay when AntiFollowbotPolicy was enabled
- Mastodon API: Blocks are now treated consistently between the Streaming API and the Timeline APIs
+- Mastodon API: `exclude_replies` is correctly handled again.
### Added
- Expiring/ephemeral activites. All activities can have expires_at value set, which controls when they should be deleted automatically.
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex
index 5052d1304..9f29087df 100644
--- a/lib/pleroma/web/activity_pub/activity_pub.ex
+++ b/lib/pleroma/web/activity_pub/activity_pub.ex
@@ -780,8 +780,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
defp restrict_replies(query, %{"exclude_replies" => val}) when val == "true" or val == "1" do
from(
- activity in query,
- where: fragment("?->'object'->>'inReplyTo' is null", activity.data)
+ [_activity, object] in query,
+ where: fragment("?->>'inReplyTo' is null", object.data)
)
end