about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-09 15:05:07 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-09 15:05:07 +0200
commit769b1ebbe0de2e3c9929add50bc18718055690d1 (patch)
tree3dd2dca3bc8c89f3a1e64ab9c2957f4e14a0c2c1
parent22a8801dbc77d2d01b326a7cb89d1a28b054e073 (diff)
Filter block users and reblogs of them from public timeline
-rw-r--r--app/channels/public_channel.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/channels/public_channel.rb b/app/channels/public_channel.rb
index 870b5cc2e..5d7fadc1d 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)