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 Follow < ApplicationRecord
|
||||
include Paginable
|
||||
include Streamable
|
||||
|
||||
belongs_to :account
|
||||
belongs_to :target_account, class_name: 'Account'
|
||||
|
@ -11,16 +10,4 @@ class Follow < ApplicationRecord
|
|||
|
||||
validates :account, :target_account, presence: true
|
||||
validates :account_id, uniqueness: { scope: :target_account_id }
|
||||
|
||||
def verb
|
||||
destroyed? ? :unfollow : :follow
|
||||
end
|
||||
|
||||
def target
|
||||
target_account
|
||||
end
|
||||
|
||||
def title
|
||||
destroyed? ? "#{account.acct} is no longer following #{target_account.acct}" : "#{account.acct} started following #{target_account.acct}"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue