about summary refs log tree commit diff
path: root/app/models/concerns/account_interactions.rb
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-18 06:37:47 -0500
committerGitHub <noreply@github.com>2023-02-18 12:37:47 +0100
commite2a3ebb271017d800a448ad3ef3e8324ac1fab3b (patch)
treeed802f97caaed335d925ea271b244fac029aed5c /app/models/concerns/account_interactions.rb
parent9ab2a775c9a832fe6320f95e5b405feb93f9eaf3 (diff)
Autofix Rubocop Style/IfUnlessModifier (#23697)
Diffstat (limited to 'app/models/concerns/account_interactions.rb')
-rw-r--r--app/models/concerns/account_interactions.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/concerns/account_interactions.rb b/app/models/concerns/account_interactions.rb
index de8bf338f..325619774 100644
--- a/app/models/concerns/account_interactions.rb
+++ b/app/models/concerns/account_interactions.rb
@@ -151,9 +151,7 @@ module AccountInteractions
     remove_potential_friendship(other_account)
 
     # When toggling a mute between hiding and allowing notifications, the mute will already exist, so the find_or_create_by! call will return the existing Mute without updating the hide_notifications attribute. Therefore, we check that hide_notifications? is what we want and set it if it isn't.
-    if mute.hide_notifications? != notifications
-      mute.update!(hide_notifications: notifications)
-    end
+    mute.update!(hide_notifications: notifications) if mute.hide_notifications? != notifications
 
     mute
   end