Merge commit 'faed9bf9f1' into kb-draft-15.8-lts

This commit is contained in:
KMY 2025-01-16 23:10:39 +09:00
commit be6dc25206
23 changed files with 313 additions and 107 deletions

View file

@ -16,7 +16,7 @@ class MentionResolveWorker
return if account.nil?
status.mentions.create!(account: account, silent: false)
status.mentions.upsert({ account_id: account.id, silent: false }, unique_by: %w(status_id account_id))
rescue ActiveRecord::RecordNotFound
# Do nothing
rescue Mastodon::UnexpectedResponseError => e

View file

@ -19,6 +19,7 @@ class Scheduler::UserCleanupScheduler
User.unconfirmed.where(confirmation_sent_at: ..UNCONFIRMED_ACCOUNTS_MAX_AGE_DAYS.days.ago).find_in_batches do |batch|
# We have to do it separately because of missing database constraints
AccountModerationNote.where(target_account_id: batch.map(&:account_id)).delete_all
WebauthnCredential.where(user_id: batch.map(&:id)).delete_all
Account.where(id: batch.map(&:account_id)).delete_all
User.where(id: batch.map(&:id)).delete_all
end