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:
parent
9594f0e858
commit
a08e724476
24 changed files with 219 additions and 234 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue