diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-08-10 13:16:26 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:17 -0500 |
commit | 034315fffe528c5181640b6f372a5822bf405f1a (patch) | |
tree | a24bd2a813c01867ddefc355535954a7ac67637a | |
parent | 256e85e32608f012209fd1d52486174995b77905 (diff) |
[Bug] Do not try to set hidden attribute if it is nil when someone is muting a post
-rw-r--r-- | app/models/concerns/account_interactions.rb | 2 |
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 |