0
0
Fork 0

Fix subscriptions:clear task, refactor feeds, refactor streamable activites

and atom feed generation to some extent, as well as the way mentions are
stored
This commit is contained in:
Eugen Rochko 2016-03-25 02:13:30 +01:00
parent 9594f0e858
commit a08e724476
24 changed files with 219 additions and 234 deletions

View file

@ -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