diff options
author | lain <lain@soykaf.club> | 2020-09-21 16:08:38 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-09-21 16:08:38 +0200 |
commit | f2f0a0260f00e316f62d42e766787b20cc92601a (patch) | |
tree | 97fe1e3a7af0688bdf1c2eb5d3a6e737bcc6db47 /test | |
parent | 882c1fc6bdff4e27955730a412d73ead0e67a741 (diff) | |
download | pleroma-f2f0a0260f00e316f62d42e766787b20cc92601a.tar.gz pleroma-f2f0a0260f00e316f62d42e766787b20cc92601a.zip |
ActivityPub: Don't block-filter your own posts
We are filtering out replies to people you block, but that should
not include your own posts.
Diffstat (limited to 'test')
-rw-r--r-- | test/web/mastodon_api/controllers/timeline_controller_test.exs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/web/mastodon_api/controllers/timeline_controller_test.exs b/test/web/mastodon_api/controllers/timeline_controller_test.exs index 517cabcff..c6e0268fd 100644 --- a/test/web/mastodon_api/controllers/timeline_controller_test.exs +++ b/test/web/mastodon_api/controllers/timeline_controller_test.exs @@ -114,8 +114,16 @@ defmodule Pleroma.Web.MastodonAPI.TimelineControllerTest do {:ok, _reply_from_friend} = CommonAPI.post(friend, %{status: "status", in_reply_to_status_id: reply_from_blockee}) - res_conn = get(conn, "/api/v1/timelines/public") - [%{"id" => ^activity_id}] = json_response_and_validate_schema(res_conn, 200) + # Still shows replies from yourself + {:ok, %{id: reply_from_me}} = + CommonAPI.post(blocker, %{status: "status", in_reply_to_status_id: reply_from_blockee}) + + response = + get(conn, "/api/v1/timelines/public") + |> json_response_and_validate_schema(200) + + assert length(response) == 2 + [%{"id" => ^reply_from_me}, %{"id" => ^activity_id}] = response end test "doesn't return replies if follow is posting with users from blocked domain" do |