diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-22 18:10:30 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-22 18:10:30 +0100 |
commit | 1dad72bf13f5e28781a2b2b6654f72624d205576 (patch) | |
tree | 27cc73b474b1cce88751a822374431837f24309a /app/models/account.rb | |
parent | 709c6685a90bb819696566cc9e42e587546d72dc (diff) |
Fixes and general progress
Diffstat (limited to 'app/models/account.rb')
-rw-r--r-- | app/models/account.rb | 12 |
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 |