From e56e3d187f8ddd3db72fc90c5d200f552d5c1c04 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Thu, 17 Sep 2020 12:05:45 -0500 Subject: [Filters] Merge thread muting and hiding into a single action --- app/models/concerns/account_interactions.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'app/models/concerns') diff --git a/app/models/concerns/account_interactions.rb b/app/models/concerns/account_interactions.rb index 538e92f41..cf8e638e7 100644 --- a/app/models/concerns/account_interactions.rb +++ b/app/models/concerns/account_interactions.rb @@ -138,10 +138,8 @@ module AccountInteractions mute end - def mute_conversation!(conversation, hidden: false) - mute = conversation_mutes.find_or_create_by!(conversation: conversation) - mute.update(hidden: hidden) if hidden.present? && mute.hidden? != hidden - mute + def mute_conversation!(conversation) + conversation_mutes.find_or_create_by!(conversation: conversation) end def block_domain!(other_domain) @@ -202,10 +200,6 @@ module AccountInteractions conversation_mutes.where(conversation: conversation).exists? end - def hiding_conversation?(conversation) - conversation_mutes.where(conversation: conversation, hidden: true).exists? - end - def muting_notifications?(other_account) mute_relationships.where(target_account: other_account, hide_notifications: true).exists? end -- cgit