1
0
Fork 0
forked from gitea/nas

Merge remote-tracking branch 'parent/main' into upstream-20241216

This commit is contained in:
KMY 2024-12-16 10:14:31 +09:00
commit 3784ad273c
555 changed files with 7564 additions and 3363 deletions

View file

@ -0,0 +1,15 @@
# frozen_string_literal: true
class Admin::DistributeTermsOfServiceNotificationWorker
include Sidekiq::Worker
def perform(terms_of_service_id)
terms_of_service = TermsOfService.find(terms_of_service_id)
terms_of_service.scope_for_notification.find_each do |user|
UserMailer.terms_of_service_changed(user, terms_of_service).deliver_later!
end
rescue ActiveRecord::RecordNotFound
true
end
end

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