Stop trying to shoehorn all Salmon updates into the poor database-connected
StreamEntry model. Simply render Salmon slaps as they are needed
This commit is contained in:
parent
94d2182717
commit
0518492158
22 changed files with 304 additions and 266 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
class Favourite < ApplicationRecord
|
||||
include Paginable
|
||||
include Streamable
|
||||
|
||||
belongs_to :account, inverse_of: :favourites
|
||||
belongs_to :status, inverse_of: :favourites
|
||||
|
@ -11,26 +10,6 @@ class Favourite < ApplicationRecord
|
|||
|
||||
validates :status_id, uniqueness: { scope: :account_id }
|
||||
|
||||
def verb
|
||||
destroyed? ? :unfavorite : :favorite
|
||||
end
|
||||
|
||||
def title
|
||||
destroyed? ? "#{account.acct} no longer favourites a status by #{status.account.acct}" : "#{account.acct} favourited a status by #{status.account.acct}"
|
||||
end
|
||||
|
||||
def thread
|
||||
status
|
||||
end
|
||||
|
||||
def target
|
||||
thread
|
||||
end
|
||||
|
||||
def hidden?
|
||||
status.private_visibility?
|
||||
end
|
||||
|
||||
before_validation do
|
||||
self.status = status.reblog if status.reblog?
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue