2016-08-17 16:56:23 +01:00
|
|
|
class Favourite < ApplicationRecord
|
2016-03-25 01:13:30 +00:00
|
|
|
include Streamable
|
|
|
|
|
2016-02-23 18:17:37 +00:00
|
|
|
belongs_to :account, inverse_of: :favourites
|
|
|
|
belongs_to :status, inverse_of: :favourites
|
|
|
|
|
|
|
|
def verb
|
|
|
|
:favorite
|
|
|
|
end
|
|
|
|
|
|
|
|
def title
|
|
|
|
"#{self.account.acct} favourited a status by #{self.status.account.acct}"
|
|
|
|
end
|
|
|
|
|
|
|
|
def object_type
|
|
|
|
target.object_type
|
|
|
|
end
|
|
|
|
|
|
|
|
def thread
|
2016-03-25 01:13:30 +00:00
|
|
|
self.status
|
2016-02-23 18:17:37 +00:00
|
|
|
end
|
|
|
|
|
2016-03-25 01:13:30 +00:00
|
|
|
def target
|
|
|
|
thread
|
2016-02-23 18:17:37 +00:00
|
|
|
end
|
|
|
|
end
|