* Add: #518 コンテンツキャッシュについて、リアクションのあった投稿は削除しないオプション * Fix: 新規登録のテストが特定時刻で落ちる問題
This commit is contained in:
parent
ba776d3677
commit
f2fb829e63
15 changed files with 118 additions and 5 deletions
|
@ -26,7 +26,7 @@ class ActivityPub::Activity::Like < ActivityPub::Activity
|
|||
def process_favourite
|
||||
return if @account.favourited?(@original_status)
|
||||
|
||||
favourite = @original_status.favourites.create!(account: @account)
|
||||
favourite = @original_status.favourites.create!(account: @account, uri: @json['id'])
|
||||
|
||||
LocalNotificationWorker.perform_async(@original_status.account_id, favourite.id, 'Favourite', 'favourite')
|
||||
Trends.statuses.register(@original_status)
|
||||
|
|
|
@ -32,9 +32,24 @@ class Vacuum::StatusesVacuum
|
|||
end
|
||||
|
||||
def statuses_scope
|
||||
Status.unscoped.kept
|
||||
.joins(:account).merge(Account.remote)
|
||||
.where('statuses.id < ?', retention_period_as_id)
|
||||
scope = Status.unscoped.kept
|
||||
.joins(:account).merge(Account.remote)
|
||||
.where('statuses.id < ?', retention_period_as_id)
|
||||
|
||||
if Setting.delete_content_cache_without_reaction
|
||||
scope = scope.where.not(id: favourited_statuses)
|
||||
.where.not(id: bookmarked_statuses)
|
||||
end
|
||||
|
||||
scope
|
||||
end
|
||||
|
||||
def favourited_statuses
|
||||
Favourite.local.select(:status_id)
|
||||
end
|
||||
|
||||
def bookmarked_statuses
|
||||
Bookmark.select(:status_id)
|
||||
end
|
||||
|
||||
def retention_period_as_id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue