From a08e724476f47b85de9bb334eeadaf882a7a23ee Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 25 Mar 2016 02:13:30 +0100 Subject: Fix subscriptions:clear task, refactor feeds, refactor streamable activites and atom feed generation to some extent, as well as the way mentions are stored --- app/models/account.rb | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'app/models/account.rb') 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 -- cgit