From 79baf2fd996c8b69333cf991f4ccf93f0965a744 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 24 Feb 2016 00:57:47 +0100 Subject: Process favourites, reblogs and replies from Salmon --- app/models/account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/account.rb') diff --git a/app/models/account.rb b/app/models/account.rb index fc399d69c..66345b5ab 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -15,7 +15,7 @@ class Account < ActiveRecord::Base has_many :followers, through: :passive_relationships, source: :account def follow!(other_account) - self.active_relationships.create!(target_account: other_account) + self.active_relationships.first_or_create!(target_account: other_account) end def unfollow!(other_account) -- cgit