From 1e74bbc4950768fa9af027034c46380487b336c0 Mon Sep 17 00:00:00 2001 From: Haelwenn Date: Wed, 29 Jan 2020 20:21:32 +0000 Subject: Merge branch 'fix-streaming-reblog' into 'develop' Streamer: Correctly handle reblog mutes Closes #1129 and #1438 See merge request pleroma/pleroma!2156 --- lib/pleroma/web/streamer/worker.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/pleroma/web/streamer/worker.ex b/lib/pleroma/web/streamer/worker.ex index da7a5a6f2..1e7da4852 100644 --- a/lib/pleroma/web/streamer/worker.ex +++ b/lib/pleroma/web/streamer/worker.ex @@ -137,8 +137,9 @@ defmodule Pleroma.Web.Streamer.Worker do domain_blocks = Pleroma.Web.ActivityPub.MRF.subdomains_regex(user.info.domain_blocks) with parent <- Object.normalize(item) || item, - true <- Enum.all?([blocks, mutes, reblog_mutes], &(item.actor not in &1)), + true <- Enum.all?([blocks, mutes], &(item.actor not in &1)), true <- Enum.all?([blocks, mutes], &(parent.data["actor"] not in &1)), + true <- item.data["type"] != "Announce" || item.actor not in reblog_mutes, true <- MapSet.disjoint?(recipients, recipient_blocks), %{host: item_host} <- URI.parse(item.actor), %{host: parent_host} <- URI.parse(parent.data["actor"]), -- cgit v1.2.3