瀏覽代碼

Merge branch 'bugfix/exclude-replies' into 'develop'

mastodon api: fix exclude_replies (closes #1287)

Closes #1287

See merge request pleroma/pleroma!1813
merge-requests/1875/head
kaniini 4 年之前
父節點
當前提交
380c67e2c3
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. +1
    -0
      CHANGELOG.md
  2. +2
    -2
      lib/pleroma/web/activity_pub/activity_pub.ex

+ 1
- 0
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.


+ 2
- 2
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



Loading…
取消
儲存