about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authoraschmitz <aschmitz@lardbucket.org>2017-11-11 14:37:23 -0600
committeraschmitz <aschmitz@lardbucket.org>2017-11-11 14:37:23 -0600
commit5128c4261e8c067321e70ffda560f14036f56bb0 (patch)
tree3dc0830509a5d8535f56e257fd034a7474570f02 /app/models
parentb95c48748cd4e7a1181cdf3f17e23d6e526a9d95 (diff)
Updates per code review
Thanks, @valerauko!
Diffstat (limited to 'app/models')
-rw-r--r--app/models/concerns/account_interactions.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/models/concerns/account_interactions.rb b/app/models/concerns/account_interactions.rb
index 60fd6ded5..a68f7c3d8 100644
--- a/app/models/concerns/account_interactions.rb
+++ b/app/models/concerns/account_interactions.rb
@@ -77,10 +77,7 @@ module AccountInteractions
   def follow!(other_account, reblogs: nil)
     reblogs = true if reblogs.nil?
     rel = active_relationships.create_with(show_reblogs: reblogs).find_or_create_by!(target_account: other_account)
-    if rel.show_reblogs != reblogs
-      rel.show_reblogs = reblogs
-      rel.save!
-    end
+    rel.update!(show_reblogs: reblogs)
 
     rel
   end