about summary refs log tree commit diff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-09-17 12:05:45 -0500
committerFire Demon <firedemon@creature.cafe>2020-09-17 12:08:35 -0500
commite56e3d187f8ddd3db72fc90c5d200f552d5c1c04 (patch)
tree59204082c7f9731d301716f08865f8639149452c /app/models/concerns
parent4a1b8bcf34ce834ee8c30f1ac94c29f4e56a2b41 (diff)
[Filters] Merge thread muting and hiding into a single action
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/account_interactions.rb10
1 files changed, 2 insertions, 8 deletions
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