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.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index f1ac6fdd7..e9fc03a10 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -65,6 +65,11 @@ class Account < ActiveRecord::Base
     @subscription ||= OStatus2::Subscription.new(self.remote_url, secret: self.secret, token: self.verify_token, webhook: webhook_url, hub: self.hub_url)
   end
 
+  def ping!(atom_url, hubs)
+    return unless local?
+    OStatus2::Publication.new(atom_url, hubs).publish
+  end
+
   def avatar_remote_url=(url)
     self.avatar = URI.parse(url)
     @avatar_remote_url = url