diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-25 02:13:30 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-25 02:13:30 +0100 |
commit | a08e724476f47b85de9bb334eeadaf882a7a23ee (patch) | |
tree | d779668fa289d2b7077c878b19fc6691a57142b7 /app/models/account.rb | |
parent | 9594f0e858172b9295c5598fcb6ab10506d3046d (diff) |
Fix subscriptions:clear task, refactor feeds, refactor streamable activites
and atom feed generation to some extent, as well as the way mentions are stored
Diffstat (limited to 'app/models/account.rb')
-rw-r--r-- | app/models/account.rb | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index c686a47ed..007fc77b6 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -1,4 +1,6 @@ class Account < ActiveRecord::Base + include Targetable + # Local users has_one :user, inverse_of: :account validates :username, uniqueness: { scope: :domain, case_sensitive: false }, if: 'local?' @@ -52,18 +54,6 @@ class Account < ActiveRecord::Base local? ? self.username : "#{self.username}@#{self.domain}" end - def object_type - :person - end - - def title - self.username - end - - def content - self.note - end - def subscribed? !(self.secret.blank? || self.verify_token.blank?) end @@ -97,6 +87,10 @@ class Account < ActiveRecord::Base self[:avatar_remote_url] = url end + def object_type + :person + end + def to_param self.username end |