about summary refs log tree commit diff
path: root/app/models/account.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-25 12:35:21 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-25 12:35:52 +0100
commite3ed212b859a7bec6b26c3d52e6f7ea14069f76d (patch)
treed82306c4fbc06f75bb38cb9042e74a65fd555165 /app/models/account.rb
parent543d06971e461510591ff64ebc666bd414e8e084 (diff)
Filter statuses that mention blocked users
Diffstat (limited to 'app/models/account.rb')
-rw-r--r--app/models/account.rb4
1 files changed, 2 insertions, 2 deletions
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)