dmails: send automated dmails from Danbooru.config.system_user.

Sends automated dmails from `Danbooru.config.system_user`, rather than
whichever user is performing the action happens to be (usually User.admins.first).

Also adds a notice in the view that the dmail was automated.
This commit is contained in:
evazion
2017-02-23 20:15:29 -06:00
parent 1400f64338
commit b1af644f67
9 changed files with 40 additions and 28 deletions

View File

@@ -30,6 +30,11 @@ module Danbooru
"webmaster@#{server_host}"
end
# System actions, such as sending automated dmails, will be performed with this account.
def system_user
User.find_by_name("DanbooruBot") || User.admins.first
end
def upgrade_account_email
contact_email
end