From 769b1ebbe0de2e3c9929add50bc18718055690d1 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Sun, 9 Oct 2016 15:05:07 +0200
Subject: [PATCH] Filter block users and reblogs of them from public timeline

---
 app/channels/public_channel.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/channels/public_channel.rb b/app/channels/public_channel.rb
index 870b5cc2e3..5d7fadc1d1 100644
--- a/app/channels/public_channel.rb
+++ b/app/channels/public_channel.rb
@@ -5,7 +5,7 @@ class PublicChannel < ApplicationCable::Channel
       message = ActiveSupport::JSON.decode(encoded_message)
 
       status = Status.find_by(id: message['id'])
-      next if status.nil?
+      next if status.nil? || current_user.account.blocking?(status.account) || (status.reblog? && current_user.account.blocking?(status.reblog.account))
 
       message['message'] = FeedManager.instance.inline_render(current_user.account, status)
 
-- 
GitLab