about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-02-24 00:57:47 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-02-24 00:57:47 +0100
commit79baf2fd996c8b69333cf991f4ccf93f0965a744 (patch)
treecbea035e448b5e374a6275e99d4673deba8ef0de /app/models
parentee73d35eea024894e851d807132c3f21a133152d (diff)
Process favourites, reblogs and replies from Salmon
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb2
1 files changed, 1 insertions, 1 deletions
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)