]> cat aescling's git repositories - mastodon.git/commitdiff
Filter block users and reblogs of them from public timeline
authorEugen Rochko <eugen@zeonfederated.com>
Sun, 9 Oct 2016 13:05:07 +0000 (15:05 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Sun, 9 Oct 2016 13:05:07 +0000 (15:05 +0200)
app/channels/public_channel.rb

index 870b5cc2e3d8db9a936883ab6111104028510f01..5d7fadc1d15baa0a6af090e6525531486aa2a1c3 100644 (file)
@@ -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)