From e3ed212b859a7bec6b26c3d52e6f7ea14069f76d Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 25 Nov 2016 12:35:21 +0100 Subject: Filter statuses that mention blocked users --- app/models/account.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models') diff --git a/app/models/account.rb b/app/models/account.rb index a60a23e14..870de8b7c 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -66,12 +66,12 @@ class Account < ApplicationRecord def unfollow!(other_account) follow = active_relationships.find_by(target_account: other_account) - follow.destroy unless follow.nil? + follow&.destroy end def unblock!(other_account) block = block_relationships.find_by(target_account: other_account) - block.destroy unless block.nil? + block&.destroy end def following?(other_account) -- cgit