feedbacks: don't send redundant dmails when user is banned or loses approver status.
When a user is banned, send them a "You have been banned" dmail instead of a "Your user record has been updated" dmail. When a user loses approver status due to inactivity, don't seen them a "Your user record has been updated" dmail for the "Lost approver privileges" neutral feedback they receive.
This commit is contained in:
@@ -29,7 +29,7 @@ module ApproverPruner
|
||||
inactive_approvers.each do |user|
|
||||
CurrentUser.scoped(User.system) do
|
||||
user.update!(level: User::Levels::CONTRIBUTOR)
|
||||
user.feedback.create(category: "neutral", body: "Lost approval privileges", creator: User.system)
|
||||
user.feedback.create!(category: "neutral", body: "Lost approval privileges", creator: User.system, disable_dmail_notification: true)
|
||||
|
||||
Dmail.create_automated(
|
||||
to_id: user.id,
|
||||
|
||||
Reference in New Issue
Block a user