Merge branch 'fix-streaming-reblog' into 'develop'

Streamer: Correctly handle reblog mutes

Closes #1129 and #1438

See merge request pleroma/pleroma!2156
This commit is contained in:
Haelwenn 2020-01-29 20:21:32 +00:00 committed by rinpatch
commit 1e74bbc495
2 changed files with 66 additions and 34 deletions

View file

@ -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"]),