Removed AdminMailer emails for reports and pending accounts
• Removed: - AdminMailer emails for reports and pending accounts
This commit is contained in:
parent
536c94e625
commit
ce69d939b7
@ -144,8 +144,6 @@ class User < ApplicationRecord
|
|||||||
|
|
||||||
if new_user && approved?
|
if new_user && approved?
|
||||||
prepare_new_user!
|
prepare_new_user!
|
||||||
elsif new_user
|
|
||||||
notify_staff_about_pending_account!
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -319,13 +317,6 @@ class User < ApplicationRecord
|
|||||||
regenerate_feed! if needs_feed_update?
|
regenerate_feed! if needs_feed_update?
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_staff_about_pending_account!
|
|
||||||
User.staff.includes(:account).each do |u|
|
|
||||||
next unless u.allows_pending_account_emails?
|
|
||||||
AdminMailer.new_pending_account(u.account, self).deliver_later
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def regenerate_feed!
|
def regenerate_feed!
|
||||||
return unless Redis.current.setnx("account:#{account_id}:regeneration", true)
|
return unless Redis.current.setnx("account:#{account_id}:regeneration", true)
|
||||||
Redis.current.expire("account:#{account_id}:regeneration", 1.day.seconds)
|
Redis.current.expire("account:#{account_id}:regeneration", 1.day.seconds)
|
||||||
|
@ -9,7 +9,6 @@ class ReportService < BaseService
|
|||||||
@options = options
|
@options = options
|
||||||
|
|
||||||
create_report!
|
create_report!
|
||||||
notify_staff!
|
|
||||||
forward_to_origin! if !@target_account.local? && ActiveModel::Type::Boolean.new.cast(@options[:forward])
|
forward_to_origin! if !@target_account.local? && ActiveModel::Type::Boolean.new.cast(@options[:forward])
|
||||||
|
|
||||||
@report
|
@report
|
||||||
@ -26,15 +25,6 @@ class ReportService < BaseService
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_staff!
|
|
||||||
return if @report.unresolved_siblings?
|
|
||||||
|
|
||||||
User.staff.includes(:account).each do |u|
|
|
||||||
next unless u.allows_report_emails?
|
|
||||||
AdminMailer.new_report(u.account, @report).deliver_later
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def forward_to_origin!
|
def forward_to_origin!
|
||||||
ActivityPub::DeliveryWorker.perform_async(
|
ActivityPub::DeliveryWorker.perform_async(
|
||||||
payload,
|
payload,
|
||||||
|
Loading…
Reference in New Issue
Block a user