FEATURE: Welcome moderator message - add copy! (#8246)

This commit is contained in:
Mark VanLandingham 2019-10-28 08:58:45 -05:00 committed by GitHub
parent 6de49b88df
commit 437edfc415
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 0 deletions

View File

@ -20,6 +20,7 @@ module Roleable
def grant_moderation!
set_permission('moderator', true)
enqueue_welcome_moderator_message
end
def revoke_moderation!

View File

@ -415,6 +415,11 @@ class User < ActiveRecord::Base
Jobs.enqueue(:send_system_message, user_id: id, message_type: "welcome_tl1_user")
end
def enqueue_welcome_moderator_message
return unless moderator
Jobs.enqueue(:send_system_message, user_id: id, message_type: 'welcome_moderator')
end
def change_username(new_username, actor = nil)
UsernameChanger.change(self, new_username, actor)
end

View File

@ -2659,6 +2659,13 @@ en:
Were really glad youre spending time with us and wed love to know more about you. Take a moment to [fill out your profile](%{base_url}/my/preferences/profile), or feel free to [start a new topic](%{base_url}/categories).
welcome_moderator:
title: "Welcome Moderator"
subject_template: "Congratulations on becoming a moderator!"
text_body_template: |
You are now a moderator. -- congratulations!
You now have access to the <a href='%{base_url}/admin' target='_blank'>admin interface</a>
welcome_invite:
title: "Welcome Invite"
subject_template: "Welcome to %{site_name}!"