about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2017-04-30 07:27:31 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-04-30 00:27:31 +0200
commit5135d609b774b177d3d3894b176a822d86b73d3c (patch)
treed0c2d75383518ab63fa80df617dd62bec25bba89 /app
parentf48cb3eb170314cba1938522c0da44af21d47e83 (diff)
Use PostgreSQL inheritance for blocks and mutes (#2520)
Diffstat (limited to 'app')
-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 19f8ca365..89710b66c 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -87,11 +87,11 @@ class Account < ApplicationRecord
   end
 
   def block!(other_account)
-    block_relationships.where(target_account: other_account).first_or_create!(target_account: other_account)
+    block_relationships.where(target_account: other_account).first_or_create!(target_account: other_account, block: true)
   end
 
   def mute!(other_account)
-    mute_relationships.where(target_account: other_account).first_or_create!(target_account: other_account)
+    mute_relationships.where(target_account: other_account).first_or_create!(target_account: other_account, block: false)
   end
 
   def unfollow!(other_account)