Updates per code review

Thanks, @valerauko!
This commit is contained in:
aschmitz
2017-11-11 14:37:23 -06:00
parent b95c48748c
commit 5128c4261e
3 changed files with 4 additions and 9 deletions

View File

@@ -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