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.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 90e8d7610..fac835168 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -29,6 +29,18 @@ class Account < ActiveRecord::Base
     self.domain.nil?
   end
 
+  def acct
+    local? ? self.username : "#{self.username}@#{self.domain}"
+  end
+
+  def object_type
+    :person
+  end
+
+  def subscribed?
+    !(self.secret.blank? || self.verify_token.blank?)
+  end
+
   def keypair
     self.private_key.nil? ? OpenSSL::PKey::RSA.new(self.public_key) : OpenSSL::PKey::RSA.new(self.private_key)
   end