about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb2
-rw-r--r--app/models/favourite.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index cc050dfa3..8b6300e35 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -75,7 +75,7 @@ class Account < ApplicationRecord
   end
 
   def ping!(atom_url, hubs)
-    return unless local?
+    return unless local? && !Rails.env.development?
     OStatus2::Publication.new(atom_url, hubs).publish
   end
 
diff --git a/app/models/favourite.rb b/app/models/favourite.rb
index 6032e539c..e248ae561 100644
--- a/app/models/favourite.rb
+++ b/app/models/favourite.rb
@@ -4,6 +4,8 @@ class Favourite < ApplicationRecord
   belongs_to :account, inverse_of: :favourites
   belongs_to :status,  inverse_of: :favourites
 
+  validates :status_id, uniqueness: { scope: :account_id }
+
   def verb
     :favorite
   end