about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-08-10 13:16:26 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:17 -0500
commit034315fffe528c5181640b6f372a5822bf405f1a (patch)
treea24bd2a813c01867ddefc355535954a7ac67637a /app/models
parent256e85e32608f012209fd1d52486174995b77905 (diff)
[Bug] Do not try to set hidden attribute if it is nil when someone is muting a post
Diffstat (limited to 'app/models')
-rw-r--r--app/models/concerns/account_interactions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/account_interactions.rb b/app/models/concerns/account_interactions.rb
index d5e2fe985..538e92f41 100644
--- a/app/models/concerns/account_interactions.rb
+++ b/app/models/concerns/account_interactions.rb
@@ -140,7 +140,7 @@ module AccountInteractions
 
   def mute_conversation!(conversation, hidden: false)
     mute = conversation_mutes.find_or_create_by!(conversation: conversation)
-    mute.update(hidden: hidden) if mute.hidden? != hidden
+    mute.update(hidden: hidden) if hidden.present? && mute.hidden? != hidden
     mute
   end