From f62539ce5c106e27a371702d499ec4df52eccde6 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 2 May 2018 15:50:20 +0200 Subject: Remove most behaviour disparities between blocks and mutes (#7231) * Remove most behaviour disparities between blocks and mutes The only differences between block and mute should be: - Mutes can optionally NOT affect notifications - Mutes should not be visible to the muted Fix #7230 Fix #5713 * Do not allow boosting someone you blocked Fix #7248 * Do not allow favouriting someone you blocked * Fix nil error in StatusPolicy --- app/policies/status_policy.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/policies') diff --git a/app/policies/status_policy.rb b/app/policies/status_policy.rb index 5573289b6..4145d7e9c 100644 --- a/app/policies/status_policy.rb +++ b/app/policies/status_policy.rb @@ -16,7 +16,11 @@ class StatusPolicy < ApplicationPolicy end def reblog? - !direct? && (!private? || owned?) && show? + !direct? && (!private? || owned?) && show? && !current_account&.blocking?(author) + end + + def favourite? + show? && !current_account&.blocking?(author) end def destroy? -- cgit