diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-28 14:33:13 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-28 14:33:13 +0100 |
commit | 8fada4fae25592e24f709faff41b0dedf6d5e36f (patch) | |
tree | 93f79243995ea3c01d9f1979c1b587f938ff2ed3 /app/models | |
parent | ad5ae3f60e5e0745912bfbc0926f6cf8bc6e9eb4 (diff) |
When posting a status or reblogging one, ping hubs about the feed update
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/account.rb | 5 |
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 |