* Add: テーブル定義、内部処理 * Add: 通知の定期削除処理、自動削除、テスト * Add: Web画面の表示、設定 * Fix test
This commit is contained in:
parent
2cc60253c4
commit
f8280ca5d9
27 changed files with 300 additions and 9 deletions
|
@ -38,6 +38,7 @@ class FeedInsertWorker
|
|||
else
|
||||
perform_push
|
||||
perform_notify if notify?
|
||||
perform_notify_for_list if notify_for_list?
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -58,6 +59,12 @@ class FeedInsertWorker
|
|||
Follow.find_by(account: @follower, target_account: @status.account)&.notify?
|
||||
end
|
||||
|
||||
def notify_for_list?
|
||||
return false unless @type == :list
|
||||
|
||||
@list.notify?
|
||||
end
|
||||
|
||||
def perform_push
|
||||
if @antenna.nil? || @antenna.insert_feeds
|
||||
case @type
|
||||
|
@ -90,6 +97,11 @@ class FeedInsertWorker
|
|||
LocalNotificationWorker.perform_async(@follower.id, @status.id, 'Status', 'status')
|
||||
end
|
||||
|
||||
def perform_notify_for_list
|
||||
list_status = ListStatus.create!(list: @list, status: @status)
|
||||
LocalNotificationWorker.perform_async(@list.account_id, list_status.id, 'ListStatus', 'list_status')
|
||||
end
|
||||
|
||||
def update?
|
||||
@options[:update]
|
||||
end
|
||||
|
|
|
@ -25,6 +25,7 @@ class Scheduler::VacuumScheduler
|
|||
applications_vacuum,
|
||||
feeds_vacuum,
|
||||
imports_vacuum,
|
||||
list_statuses_vacuum,
|
||||
]
|
||||
end
|
||||
|
||||
|
@ -32,6 +33,10 @@ class Scheduler::VacuumScheduler
|
|||
Vacuum::StatusesVacuum.new(content_retention_policy.content_cache_retention_period)
|
||||
end
|
||||
|
||||
def list_statuses_vacuum
|
||||
Vacuum::ListStatusesVacuum.new
|
||||
end
|
||||
|
||||
def media_attachments_vacuum
|
||||
Vacuum::MediaAttachmentsVacuum.new(content_retention_policy.media_cache_retention_period)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue