about summary refs log tree commit diff
path: root/app/models/account.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/account.rb')
-rw-r--r--app/models/account.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
new file mode 100644
index 000000000..c0b153794
--- /dev/null
+++ b/app/models/account.rb
@@ -0,0 +1,7 @@
+class Account < ActiveRecord::Base
+  has_many :statuses, inverse_of: :account
+
+  def subscription(webhook_url)
+    @subscription ||= OStatus2::Subscription.new(self.remote_url, secret: self.secret, token: self.verify_token, webhook: webhook_url, hub: self.hub_url)
+  end
+end