aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-10-19 04:26:35 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-10-19 04:26:35 +0000
commit0495a07dc77d81abf46cbe166ae3fec14f705809 (patch)
tree106033d9ae6ad32875bcda54599058c91e1129e6 /test
parentbe611b143bf2840c039aaf63dbf1a73d9f9daf7b (diff)
parent7a2f100061913ec59db9957893eb92bb2d150dc4 (diff)
downloadpleroma-0495a07dc77d81abf46cbe166ae3fec14f705809.tar.gz
Merge branch '2239-mute-fixes' into 'develop'
ActivityPub: Show own replies to muted users. Closes #2239 See merge request pleroma/pleroma!3084
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/web/activity_pub/activity_pub_test.exs16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/pleroma/web/activity_pub/activity_pub_test.exs b/test/pleroma/web/activity_pub/activity_pub_test.exs
index 1a8a844ca..e6b6086e6 100644
--- a/test/pleroma/web/activity_pub/activity_pub_test.exs
+++ b/test/pleroma/web/activity_pub/activity_pub_test.exs
@@ -752,6 +752,22 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
refute repeat_activity in activities
end
+ test "returns your own posts regardless of mute" do
+ user = insert(:user)
+ muted = insert(:user)
+
+ {:ok, muted_post} = CommonAPI.post(muted, %{status: "Im stupid"})
+
+ {:ok, reply} =
+ CommonAPI.post(user, %{status: "I'm muting you", in_reply_to_status_id: muted_post.id})
+
+ {:ok, _} = User.mute(user, muted)
+
+ [activity] = ActivityPub.fetch_activities([], %{muting_user: user, skip_preload: true})
+
+ assert activity.id == reply.id
+ end
+
test "doesn't return muted activities" do
activity_one = insert(:note_activity)
activity_two = insert(:note_activity)