Use PostgreSQL inheritance for blocks and mutes (#2520)
This commit is contained in:
committed by
Eugen Rochko
parent
f48cb3eb17
commit
5135d609b7
@ -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)
|
||||
|
Reference in New Issue
Block a user